summaryrefslogtreecommitdiff
path: root/libavcodec/h263dec.c
diff options
context:
space:
mode:
authorRĂ©mi Denis-Courmont <remi@remlab.net>2014-10-08 20:37:01 +0300
committerJanne Grunau <janne-libav@jannau.net>2014-10-13 16:05:04 +0200
commitc80a816142699dea9cf9fa66689a7838a487ed7e (patch)
tree71106f86007a91f0bdba5e286c67bfb848007759 /libavcodec/h263dec.c
parent1f29e5d7a2b0950f3b6820896e97e2c02e6a10a9 (diff)
h263dec: call get_format() on resolution changes
Fail safe if the pixel format changes.
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r--libavcodec/h263dec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 29634b0e9d..31e014a9c7 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -513,6 +513,12 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if ((ret = ff_mpv_common_frame_size_change(s)))
return ret;
+
+ if (avctx->pix_fmt != h263_get_format(avctx)) {
+ av_log(avctx, AV_LOG_ERROR, "format change not supported\n");
+ avctx->pix_fmt = AV_PIX_FMT_NONE;
+ return AVERROR_UNKNOWN;
+ }
}
if (s->codec_id == AV_CODEC_ID_H263 ||