Merge commit 'c4033cd4eb921a9cc8deb513efc6d6a6ba3b2163' into release/0.10
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Jun 2014 23:39:49 +0000 (01:39 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Jun 2014 23:39:49 +0000 (01:39 +0200)
* commit 'c4033cd4eb921a9cc8deb513efc6d6a6ba3b2163':
  h264: reject mismatching luma/chroma bit depths during sps parsing

Conflicts:
libavcodec/h264.c
libavcodec/h264_ps.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264.c
libavcodec/h264_ps.c

index 1bd3628..3174401 100644 (file)
@@ -4108,11 +4108,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
             if(avctx->has_b_frames < 2)
                 avctx->has_b_frames= !s->low_delay;
 
-            if (h->sps.bit_depth_luma != h->sps.bit_depth_chroma) {
-                av_log_missing_feature(s->avctx,
-                    "Different bit depth between chroma and luma", 1);
-                return AVERROR_PATCHWELCOME;
-            }
             break;
         case NAL_PPS:
             init_get_bits(&s->gb, ptr, bit_length);
index c703b28..d8229e3 100644 (file)
@@ -370,6 +370,11 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
                    sps->bit_depth_luma, sps->bit_depth_chroma);
             goto fail;
         }
+        if (sps->bit_depth_chroma != sps->bit_depth_luma) {
+            av_log_missing_feature(s->avctx,
+                "Different bit depth between chroma and luma", 1);
+            goto fail;
+        }
         sps->transform_bypass = get_bits1(&s->gb);
         decode_scaling_matrices(h, sps, NULL, 1, sps->scaling_matrix4, sps->scaling_matrix8);
     }else{