Module: libav
Branch: master
Commit: c80a816142699dea9cf9fa66689a7838a487ed7e

Author:    Rémi Denis-Courmont <[email protected]>
Committer: Janne Grunau <[email protected]>
Date:      Wed Oct  8 20:37:01 2014 +0300

h263dec: call get_format() on resolution changes

Fail safe if the pixel format changes.

---

 libavcodec/h263dec.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 29634b0..31e014a 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  ||

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to