Merge commit '6e5cdf26281945ddea3aaf5eca4d127791f23ca8'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 27 Nov 2012 13:21:13 +0000 (14:21 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 27 Nov 2012 13:31:04 +0000 (14:31 +0100)
* commit '6e5cdf26281945ddea3aaf5eca4d127791f23ca8':
  h264: check ref_count validity for num_ref_idx_active_override_flag
  h264: add missing new line to log message
  dcadec: skip QMF on unused channels
  wavenc: write fact chunk sample count at the correct file position
  riff: do not add empty metadata tags in INFO chunk

Conflicts:
libavcodec/dcadec.c
libavcodec/h264.c
libavformat/riff.c

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

index 0ebbc64..8b985a8 100644 (file)
@@ -1440,10 +1440,10 @@ static int dca_filter_channels(DCAContext *s, int block_index)
     for (k = 0; k < s->prim_channels; k++) {
 /*        static float pcm_to_double[8] = { 32768.0, 32768.0, 524288.0, 524288.0,
                                             0, 8388608.0, 8388608.0 };*/
-        if(s->channel_order_tab[k] >= 0)
-        qmf_32_subbands(s, k, subband_samples[k],
-                        s->samples_chanptr[s->channel_order_tab[k]],
-                        M_SQRT1_2 / 32768.0 /* pcm_to_double[s->source_pcm_res] */);
+        if (s->channel_order_tab[k] >= 0)
+            qmf_32_subbands(s, k, subband_samples[k],
+                            s->samples_chanptr[s->channel_order_tab[k]],
+                            M_SQRT1_2 / 32768.0 /* pcm_to_double[s->source_pcm_res] */);
     }
 
     /* Down mixing */
index 0413ba4..094333d 100644 (file)
@@ -2931,9 +2931,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
 
         if (num_ref_idx_active_override_flag) {
             h->ref_count[0] = get_ue_golomb(&s->gb) + 1;
-            if (h->slice_type_nos == AV_PICTURE_TYPE_B)
+            if (h->slice_type_nos == AV_PICTURE_TYPE_B) {
                 h->ref_count[1] = get_ue_golomb(&s->gb) + 1;
-            else
+            else
                 // full range is spec-ok in this case, even for frames
                 h->ref_count[1] = 1;
         }
index 6845466..5ad0eb0 100644 (file)
@@ -837,6 +837,12 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
 
         chunk_size += (chunk_size & 1);
 
+        if (!chunk_code) {
+            if (chunk_size)
+                avio_skip(pb, chunk_size);
+            continue;
+        }
+
         value = av_mallocz(chunk_size + 1);
         if (!value) {
             av_log(s, AV_LOG_ERROR, "out of memory, unable to read INFO tag\n");