summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/ptx.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg/libavcodec/ptx.c')
-rw-r--r--ffmpeg/libavcodec/ptx.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ffmpeg/libavcodec/ptx.c b/ffmpeg/libavcodec/ptx.c
index 37135c5..8c3abd7 100644
--- a/ffmpeg/libavcodec/ptx.c
+++ b/ffmpeg/libavcodec/ptx.c
@@ -55,10 +55,9 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
buf += offset;
- 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;
@@ -85,9 +84,9 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVCodec ff_ptx_decoder = {
.name = "ptx",
+ .long_name = NULL_IF_CONFIG_SMALL("V.Flash PTX image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_PTX,
.decode = ptx_decode_frame,
.capabilities = CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("V.Flash PTX image"),
};