diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 0ebbc64ffc..8b985a86cf 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -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 */ diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 0413ba470c..094333d9fd 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -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; } diff --git a/libavformat/riff.c b/libavformat/riff.c index 684546670a..5ad0eb01c8 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -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");