summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/mvcdec.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/mvcdec.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/mvcdec.c')
-rw-r--r--ffmpeg/libavcodec/mvcdec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ffmpeg/libavcodec/mvcdec.c b/ffmpeg/libavcodec/mvcdec.c
index c4385fe..2cc7735 100644
--- a/ffmpeg/libavcodec/mvcdec.c
+++ b/ffmpeg/libavcodec/mvcdec.c
@@ -39,6 +39,7 @@ static av_cold int mvc_decode_init(AVCodecContext *avctx)
MvcContext *s = avctx->priv_data;
int width = avctx->width;
int height = avctx->height;
+ int ret;
if (avctx->codec_id == AV_CODEC_ID_MVC1) {
width += 3;
@@ -46,8 +47,8 @@ static av_cold int mvc_decode_init(AVCodecContext *avctx)
}
width &= ~3;
height &= ~3;
- if (width != avctx->width || height != avctx->height)
- avcodec_set_dimensions(avctx, width, height);
+ if ((ret = ff_set_dimensions(avctx, width, height)) < 0)
+ return ret;
avctx->pix_fmt = (avctx->codec_id == AV_CODEC_ID_MVC1) ? AV_PIX_FMT_RGB555 : AV_PIX_FMT_BGRA;
s->frame = av_frame_alloc();
@@ -260,6 +261,7 @@ static av_cold int mvc_decode_end(AVCodecContext *avctx)
#if CONFIG_MVC1_DECODER
AVCodec ff_mvc1_decoder = {
.name = "mvc1",
+ .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 1"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_MVC1,
.priv_data_size = sizeof(MvcContext),
@@ -267,13 +269,13 @@ AVCodec ff_mvc1_decoder = {
.close = mvc_decode_end,
.decode = mvc_decode_frame,
.capabilities = CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 1"),
};
#endif
#if CONFIG_MVC2_DECODER
AVCodec ff_mvc2_decoder = {
.name = "mvc2",
+ .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 2"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_MVC2,
.priv_data_size = sizeof(MvcContext),
@@ -281,6 +283,5 @@ AVCodec ff_mvc2_decoder = {
.close = mvc_decode_end,
.decode = mvc_decode_frame,
.capabilities = CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 2"),
};
#endif