X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdpx.c;h=a9a8c16d6c33f0fc5802de05c1402dade081b635;hb=d27edc038a5d59f25b28964b38d9f8d7ce4a6e64;hp=4d09efe543c9e5676195b8cb606736c240f7359b;hpb=9f8e2e92ae88841709ae1ffe71572ef7e5e865c7;p=ffmpeg diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index 4d09efe543c..a9a8c16d6c3 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -23,6 +23,7 @@ #include "libavutil/imgutils.h" #include "bytestream.h" #include "avcodec.h" +#include "internal.h" typedef struct DPXContext { AVFrame picture; @@ -58,7 +59,7 @@ static uint16_t read10in32(const uint8_t **ptr, uint32_t * lbuf, static int decode_frame(AVCodecContext *avctx, void *data, - int *data_size, + int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; @@ -187,7 +188,7 @@ static int decode_frame(AVCodecContext *avctx, if (s->picture.data[0]) avctx->release_buffer(avctx, &s->picture); - if (avctx->get_buffer(avctx, p) < 0) { + if (ff_get_buffer(avctx, p) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return -1; } @@ -262,7 +263,7 @@ static int decode_frame(AVCodecContext *avctx, } *picture = s->picture; - *data_size = sizeof(AVPicture); + *got_frame = 1; return buf_size; }