X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdvdec.c;h=fd00cc18d608ee812458413964cf36a9a44fd9f2;hb=8f44170d307af99d1891a531b2fe6caa28cb8f37;hp=d3a12347b3dfcdf40beab78b69829eed20372068;hpb=7dc0ed80e877a16a11ba45d747723d88e8a92cd8;p=ffmpeg diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index d3a12347b3d..fd00cc18d60 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -39,6 +39,7 @@ #include "libavutil/pixdesc.h" #include "avcodec.h" #include "dsputil.h" +#include "internal.h" #include "get_bits.h" #include "put_bits.h" #include "simple_idct.h" @@ -311,7 +312,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg) /* NOTE: exactly one frame must be given (120000 bytes for NTSC, 144000 bytes for PAL - or twice those for 50Mbps) */ static int dvvideo_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, + void *data, int *got_frame, AVPacket *avpkt) { uint8_t *buf = avpkt->data; @@ -336,7 +337,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, avctx->pix_fmt = s->sys->pix_fmt; avctx->time_base = s->sys->time_base; avcodec_set_dimensions(avctx, s->sys->width, s->sys->height); - if (avctx->get_buffer(avctx, &s->picture) < 0) { + if (ff_get_buffer(avctx, &s->picture) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return -1; } @@ -359,7 +360,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, emms_c(); /* return image */ - *data_size = sizeof(AVFrame); + *got_frame = 1; *(AVFrame*)data = s->picture; return s->sys->frame_size;