summaryrefslogtreecommitdiff
path: root/libavcodec/interplayvideo.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-01-06 03:07:31 +0200
committerMartin Storsjö <martin@martin.st>2012-01-07 15:25:38 +0200
commit17aa02b9a112398f8d9f74dcb3db55c31e91c8fe (patch)
treed4e24fe6e11bda12a91230dde34538d00a371d99 /libavcodec/interplayvideo.c
parentc5d907b6b03ef431b9901fc9090887b03fd7a09a (diff)
interplayvideo: Handle changed video dimensions on the fly
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/interplayvideo.c')
-rw-r--r--libavcodec/interplayvideo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index db98bec9c5..724f5f1850 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -1019,9 +1019,6 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
dsputil_init(&s->dsp, avctx);
- /* decoding map contains 4 bits of information per 8x8 block */
- s->decoding_map_size = avctx->width * avctx->height / (8 * 8 * 2);
-
s->current_frame.data[0] = s->last_frame.data[0] =
s->second_last_frame.data[0] = NULL;
@@ -1036,6 +1033,9 @@ static int ipvideo_decode_frame(AVCodecContext *avctx,
int buf_size = avpkt->size;
IpvideoContext *s = avctx->priv_data;
+ /* decoding map contains 4 bits of information per 8x8 block */
+ s->decoding_map_size = avctx->width * avctx->height / (8 * 8 * 2);
+
/* compressed buffer needs to be large enough to at least hold an entire
* decoding map */
if (buf_size < s->decoding_map_size)
@@ -1096,6 +1096,6 @@ AVCodec ff_interplay_video_decoder = {
.init = ipvideo_decode_init,
.close = ipvideo_decode_end,
.decode = ipvideo_decode_frame,
- .capabilities = CODEC_CAP_DR1,
+ .capabilities = CODEC_CAP_DR1 | CODEC_CAP_PARAM_CHANGE,
.long_name = NULL_IF_CONFIG_SMALL("Interplay MVE video"),
};