fprintf(stderr, "get_buffer() failed\n");
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
static int decode_frame(AVCodecContext *avctx,                         void *data, int *data_size,                        uint8_t *buf, int buf_size){    ASV1Context * const a = avctx->priv_data;    AVFrame *picture = data;    AVFrame * const p= (AVFrame*)&a->picture;    int mb_x, mb_y;    *data_size = 0;    /* special case for last picture */    if (buf_size == 0) {        return 0;    }    if(p->data[0])        avctx->release_buffer(avctx, p);    p->reference= 0;    if(avctx->get_buffer(avctx, p) < 0){        fprintf(stderr, "get_buffer() failed\n");        return -1;    }    p->pict_type= I_TYPE;    p->key_frame= 1;    a->bitstream_buffer= av_fast_realloc(a->bitstream_buffer, &a->bitstream_buffer_size, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);        if(avctx->codec_id == CODEC_ID_ASV1)        a->dsp.bswap_buf((uint32_t*)a->bitstream_buffer, (uint32_t*)buf, buf_size/4);    else{        int i;        for(i=0; i<buf_size; i++)            a->bitstream_buffer[i]= reverse[ buf[i] ];    }    init_get_bits(&a->gb, a->bitstream_buffer, buf_size*8);    for(mb_y=0; mb_y<a->mb_height2; mb_y++){        for(mb_x=0; mb_x<a->mb_width2; mb_x++){            if( decode_mb(a, a->block) <0)                return -1;                         idct_put(a, mb_x, mb_y);        }    }    if(a->mb_width2 != a->mb_width){        mb_x= a->mb_width2;        for(mb_y=0; mb_y<a->mb_height2; mb_y++){            if( decode_mb(a, a->block) <0)                return -1;                         idct_put(a, mb_x, mb_y);        }    }    if(a->mb_height2 != a->mb_height){        mb_y= a->mb_height2;        for(mb_x=0; mb_x<a->mb_width; mb_x++){            if( decode_mb(a, a->block) <0)                return -1;                         idct_put(a, mb_x, mb_y);        }    }#if 0    int i;printf("%d %d\n", 8*buf_size, get_bits_count(&a->gb));for(i=get_bits_count(&a->gb); i<8*buf_size; i++){    printf("%d", get_bits1(&a->gb));}for(i=0; i<s->avctx->extradata_size; i++){    printf("%c\n", ((uint8_t*)s->avctx->extradata)[i]);}#endif    *picture= *(AVFrame*)&a->picture;    *data_size = sizeof(AVPicture);    emms_c();        return (get_bits_count(&a->gb)+31)/32*4;}