Revision d6db1c9c libavcodec/mpegvideo.c

View differences:

libavcodec/mpegvideo.c
791 791
}
792 792

  
793 793
/* generic function for encode/decode called before a frame is coded/decoded */
794
void MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
794
int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
795 795
{
796 796
    int i;
797 797
    UINT8 *tmp;
......
800 800
    avctx->mbskip_table= s->mbskip_table;
801 801

  
802 802
    if(avctx->flags&CODEC_FLAG_DR1){
803
        avctx->get_buffer_callback(avctx, s->width, s->height, s->pict_type);
803
        if(avctx->get_buffer_callback(avctx, s->width, s->height, s->pict_type) < 0){
804
            fprintf(stderr, "get_buffer() failed\n");
805
            return -1;
806
        }
804 807

  
805 808
        s->linesize  = avctx->dr_stride;
806 809
        s->uvlinesize= avctx->dr_uvstride;
......
854 857
            s->dct_unquantize = s->dct_unquantize_h263;
855 858
    }else 
856 859
        s->dct_unquantize = s->dct_unquantize_mpeg1;
860

  
861
    return 0;
857 862
}
858 863

  
859 864
/* generic function for encode/decode called after a frame has been coded/decoded */

Also available in: Unified diff