From f7813a5324be39d13ab536c245d15dfc602a7849 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 29 Dec 2013 12:19:38 +0000 Subject: basic type mechanism working --- ffmpeg/libavcodec/cdxl.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'ffmpeg/libavcodec/cdxl.c') diff --git a/ffmpeg/libavcodec/cdxl.c b/ffmpeg/libavcodec/cdxl.c index 7e7b7bc..13ad57c 100644 --- a/ffmpeg/libavcodec/cdxl.c +++ b/ffmpeg/libavcodec/cdxl.c @@ -19,6 +19,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * Commodore CDXL video decoder + * @author Paul B Mahol + */ + #define UNCHECKED_BITSTREAM_READER 1 #include "libavutil/intreadwrite.h" @@ -239,10 +245,8 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data, return AVERROR_PATCHWELCOME; } - 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); aligned_width = FFALIGN(c->avctx->width, 16); c->padded_bits = aligned_width - c->avctx->width; @@ -285,13 +289,14 @@ static av_cold int cdxl_decode_end(AVCodecContext *avctx) { CDXLVideoContext *c = avctx->priv_data; - av_free(c->new_video); + av_freep(&c->new_video); return 0; } AVCodec ff_cdxl_decoder = { .name = "cdxl", + .long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_CDXL, .priv_data_size = sizeof(CDXLVideoContext), @@ -299,5 +304,4 @@ AVCodec ff_cdxl_decoder = { .close = cdxl_decode_end, .decode = cdxl_decode_frame, .capabilities = CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video"), }; -- cgit v1.2.3