summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/targa.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg/libavcodec/targa.c')
-rw-r--r--ffmpeg/libavcodec/targa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ffmpeg/libavcodec/targa.c b/ffmpeg/libavcodec/targa.c
index ff4390f..b0c9b55 100644
--- a/ffmpeg/libavcodec/targa.c
+++ b/ffmpeg/libavcodec/targa.c
@@ -173,12 +173,12 @@ static int decode_frame(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;
}
- if ((ret = av_image_check_size(w, h, 0, avctx)) < 0)
+ if ((ret = ff_set_dimensions(avctx, w, h)) < 0)
return ret;
- if (w != avctx->width || h != avctx->height)
- avcodec_set_dimensions(avctx, w, h);
+
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
+ p->pict_type = AV_PICTURE_TYPE_I;
if (flags & TGA_TOPTOBOTTOM) {
dst = p->data[0];
@@ -298,10 +298,10 @@ static int decode_frame(AVCodecContext *avctx,
AVCodec ff_targa_decoder = {
.name = "targa",
+ .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_TARGA,
.priv_data_size = sizeof(TargaContext),
.decode = decode_frame,
.capabilities = CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"),
};