X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Ftarga.c;h=6bb05a93addb04ca020b4d6c802bb5f2f7226e5d;hb=6fb40779cd3457a819e20d6db91a142c47cad3c2;hp=d761078cfefe710da51a91a5c9984095b3da16d5;hpb=1eb8809a4178b180045d920d45727328186103c5;p=ffmpeg diff --git a/libavcodec/targa.c b/libavcodec/targa.c index d761078cfef..6bb05a93add 100644 --- a/libavcodec/targa.c +++ b/libavcodec/targa.c @@ -23,6 +23,7 @@ #include "libavutil/imgutils.h" #include "avcodec.h" #include "bytestream.h" +#include "internal.h" #include "targa.h" typedef struct TargaContext { @@ -107,7 +108,7 @@ static int targa_decode_rle(AVCodecContext *avctx, TargaContext *s, } static int decode_frame(AVCodecContext *avctx, - void *data, int *data_size, + void *data, int *got_frame, AVPacket *avpkt) { TargaContext * const s = avctx->priv_data; @@ -181,7 +182,7 @@ static int decode_frame(AVCodecContext *avctx, return ret; if (w != avctx->width || h != avctx->height) avcodec_set_dimensions(avctx, w, h); - if ((ret = avctx->get_buffer(avctx, p)) < 0) { + if ((ret = ff_get_buffer(avctx, p)) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return ret; } @@ -297,7 +298,7 @@ static int decode_frame(AVCodecContext *avctx, } *picture = s->picture; - *data_size = sizeof(AVPicture); + *got_frame = 1; return avpkt->size; }