]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit 'b146d74730ab9ec5abede9066f770ad851e45fbc'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 29 Sep 2012 12:42:11 +0000 (14:42 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 29 Sep 2012 12:45:55 +0000 (14:45 +0200)
* commit 'b146d74730ab9ec5abede9066f770ad851e45fbc':
  indeo4: update AVCodecContext width/height on size change
  dfa: check that the caller set width/height properly.
  indeo5dec: Make sure we have had a valid gop header.
  cavsdec: check for changing w/h.
  lavc: set channel count from channel layout in avcodec_open2().
  doc/platform: Rework the Visual Studio linking section
  doc/faq: Change the Visual Studio entry to reflect current status
  doc/platform: Replace Visual Studio section with build instructions
  doc/platform: Nuke section on linking static MinGW-built libs with MSVC
  doc/platform: Remove false claim about MinGW installer
  doc/platform: Mention MinGW-w64
  dsputil_mmx: fix reading prior of the src array in sub_hfyu_median_prediction()
  mpegaudiodec: fix short_start calculation

Conflicts:
doc/faq.texi
doc/platform.texi
libavcodec/cavsdec.c
libavcodec/indeo5.c
libavcodec/ivi_common.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/cavsdec.c
libavcodec/dfa.c
libavcodec/indeo5.c
libavcodec/ivi_common.c
libavcodec/utils.c

index 4e69176c2f71138a8ce0f899c3014f8a69100518,e55e4f6e07e90965d0bd20e5e4ad6137dc864e50..41193038358fa6626e03295ad147e1721d166544
@@@ -1073,18 -1061,16 +1073,20 @@@ static int decode_seq_header(AVSContex
      h->profile =         get_bits(&s->gb,8);
      h->level =           get_bits(&s->gb,8);
      skip_bits1(&s->gb); //progressive sequence
-        width =           get_bits(&s->gb,14);
-        height =          get_bits(&s->gb,14);
+     width  = get_bits(&s->gb, 14);
+     height = get_bits(&s->gb, 14);
      if ((s->width || s->height) && (s->width != width || s->height != height)) {
          av_log_missing_feature(s, "Width/height changing in CAVS is", 0);
-         return -1;
+         return AVERROR_PATCHWELCOME;
      }
 +    if (width <= 0 || height <= 0) {
 +        av_log(s, AV_LOG_ERROR, "Dimensions invalid\n");
 +        return AVERROR_INVALIDDATA;
 +    }
      s->width  = width;
      s->height = height;
      skip_bits(&s->gb,2); //chroma format
      skip_bits(&s->gb,3); //sample_precision
      h->aspect_ratio =    get_bits(&s->gb,4);
Simple merge
Simple merge
Simple merge
index 53b8b2bf1f3c8a260f73efa3dfb06c32046640af,7c02d332b96eb3363ad314b7e7a5e63cdbd7af81..c462a9d51e2adcb913dc8a046f96ceda7ee79252
@@@ -1017,16 -854,17 +1017,21 @@@ int attribute_align_arg avcodec_open2(A
          }
      }
  
 +    ret=0;
 +
      if (av_codec_is_decoder(avctx->codec)) {
 +        if (!avctx->bit_rate)
 +            avctx->bit_rate = get_bit_rate(avctx);
          /* validate channel layout from the decoder */
-         if (avctx->channel_layout &&
-             av_get_channel_layout_nb_channels(avctx->channel_layout) != avctx->channels) {
-             av_log(avctx, AV_LOG_WARNING, "channel layout does not match number of channels\n");
-             avctx->channel_layout = 0;
+         if (avctx->channel_layout) {
+             int channels = av_get_channel_layout_nb_channels(avctx->channel_layout);
+             if (!avctx->channels)
+                 avctx->channels = channels;
+             else if (channels != avctx->channels) {
+                 av_log(avctx, AV_LOG_WARNING,
+                        "channel layout does not match number of channels\n");
+                 avctx->channel_layout = 0;
+             }
          }
      }
  end: