X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fxfacedec.c;h=a2f8636caee0c3375fe799c6f93afc699a7c31f5;hb=8f44170d307af99d1891a531b2fe6caa28cb8f37;hp=7cccfa5c94c56c7d0dc90157b4ef65d1f67a8053;hpb=4116151a4bf35cffd2b55b028e714bb2c383c86f;p=ffmpeg diff --git a/libavcodec/xfacedec.c b/libavcodec/xfacedec.c index 7cccfa5c94c..a2f8636caee 100644 --- a/libavcodec/xfacedec.c +++ b/libavcodec/xfacedec.c @@ -27,6 +27,7 @@ #include "libavutil/pixdesc.h" #include "avcodec.h" #include "bytestream.h" +#include "internal.h" #include "xface.h" static int pop_integer(BigInt *b, const ProbRange *pranges) @@ -123,7 +124,7 @@ static av_cold int xface_decode_close(AVCodecContext *avctx) } static int xface_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, + void *data, int *got_frame, AVPacket *avpkt) { XFaceContext *xface = avctx->priv_data; @@ -136,7 +137,7 @@ static int xface_decode_frame(AVCodecContext *avctx, if (xface->frame.data[0]) avctx->release_buffer(avctx, &xface->frame); xface->frame.data[0] = NULL; - if ((ret = avctx->get_buffer(avctx, &xface->frame)) < 0) + if ((ret = ff_get_buffer(avctx, &xface->frame)) < 0) return ret; xface->frame.reference = 0; @@ -188,7 +189,7 @@ static int xface_decode_frame(AVCodecContext *avctx, } } - *data_size = sizeof(AVFrame); + *got_frame = 1; *(AVFrame*)data = xface->frame; return avpkt->size;