summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/cdxl.c
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/cdxl.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/cdxl.c')
-rw-r--r--ffmpeg/libavcodec/cdxl.c14
1 files changed, 9 insertions, 5 deletions
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"),
};