]> git.sesse.net Git - ffmpeg/commitdiff
mxfdec: Consider QuantizationBits between 17 and 24 to be pcm_s24*
authorTomas Härdin <tomas.hardin@codemill.se>
Tue, 27 Sep 2011 09:14:59 +0000 (11:14 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 27 Sep 2011 13:15:54 +0000 (15:15 +0200)
This fixes playback of BRD38772509.mxf

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mxfdec.c

index 9adeb1feee68697bdb120604f7502b9cf71753b2..92d93f3b37c6206cad9fd9145298be857d03f78f 100644 (file)
@@ -916,12 +916,12 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
             st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den;
             /* TODO: implement CODEC_ID_RAWAUDIO */
             if (st->codec->codec_id == CODEC_ID_PCM_S16LE) {
-                if (descriptor->bits_per_sample == 24)
+                if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24)
                     st->codec->codec_id = CODEC_ID_PCM_S24LE;
                 else if (descriptor->bits_per_sample == 32)
                     st->codec->codec_id = CODEC_ID_PCM_S32LE;
             } else if (st->codec->codec_id == CODEC_ID_PCM_S16BE) {
-                if (descriptor->bits_per_sample == 24)
+                if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24)
                     st->codec->codec_id = CODEC_ID_PCM_S24BE;
                 else if (descriptor->bits_per_sample == 32)
                     st->codec->codec_id = CODEC_ID_PCM_S32BE;