Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 31 Aug 2013 11:47:04 +0000 (13:47 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 31 Aug 2013 11:47:04 +0000 (13:47 +0200)
* qatar/master:
  pcm_bluray: cosmetics

Conflicts:
libavcodec/pcm-bluray.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/pcm-bluray.c

@@@ -70,14 -71,13 +71,14 @@@ static int pcm_bluray_parse_header(AVCo
  
      /* get the sample depth and derive the sample format from it */
      avctx->bits_per_coded_sample = bits_per_samples[header[3] >> 6];
 -    if (!avctx->bits_per_coded_sample) {
 -        av_log(avctx, AV_LOG_ERROR, "reserved sample depth (0)\n");
 +    if (!(avctx->bits_per_coded_sample == 16 || avctx->bits_per_coded_sample == 24)) {
 +        av_log(avctx, AV_LOG_ERROR, "unsupported sample depth (%d)\n", avctx->bits_per_coded_sample);
          return AVERROR_INVALIDDATA;
      }
-     avctx->sample_fmt = avctx->bits_per_coded_sample == 16 ? AV_SAMPLE_FMT_S16 :
-                                                              AV_SAMPLE_FMT_S32;
+     avctx->sample_fmt = avctx->bits_per_coded_sample == 16 ? AV_SAMPLE_FMT_S16
+                                                            : AV_SAMPLE_FMT_S32;
 -    avctx->bits_per_raw_sample = avctx->bits_per_coded_sample;
 +    if (avctx->sample_fmt == AV_SAMPLE_FMT_S32)
 +        avctx->bits_per_raw_sample = avctx->bits_per_coded_sample;
  
      /* get the sample rate. Not all values are used. */
      switch (header[2] & 0x0f) {