OSDN Git Service

h263dec: sanitize a condition.
authorAnton Khirnov <anton@khirnov.net>
Tue, 26 Nov 2013 10:07:22 +0000 (11:07 +0100)
committerAnton Khirnov <anton@khirnov.net>
Wed, 27 Nov 2013 21:24:50 +0000 (22:24 +0100)
Call ff_mpeg4_decode_picture_header() only when the decoder has the
MPEG4 codec id, not based on a vaguely related value of h263_pred.

libavcodec/h263dec.c

index fceb217..48e67cb 100644 (file)
@@ -434,7 +434,7 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
         ret = ff_wmv2_decode_picture_header(s);
     } else if (CONFIG_MSMPEG4_DECODER && s->msmpeg4_version) {
         ret = ff_msmpeg4_decode_picture_header(s);
-    } else if (CONFIG_MPEG4_DECODER && s->h263_pred) {
+    } else if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4) {
         if (s->avctx->extradata_size && s->picture_number == 0) {
             GetBitContext gb;