diff options
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index ff97a9b..15df2bf 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -25,6 +25,7 @@ //#define DEBUG //#define MOV_EXPORT_ALL_METADATA +#include "libavutil/audioconvert.h" #include "libavutil/intreadwrite.h" #include "libavutil/intfloat.h" #include "libavutil/mathematics.h" @@ -32,6 +33,7 @@ #include "libavutil/dict.h" #include "libavutil/opt.h" #include "libavutil/timecode.h" +#include "libavcodec/ac3tab.h" #include "avformat.h" #include "internal.h" #include "avio_internal.h" @@ -570,6 +572,9 @@ static int mov_read_dac3(MOVContext *c, AVIOContext *pb, MOVAtom atom) acmod = (ac3info >> 11) & 0x7; lfeon = (ac3info >> 10) & 0x1; st->codec->channels = ((int[]){2,1,2,3,3,4,4,5})[acmod] + lfeon; + st->codec->channel_layout = avpriv_ac3_channel_layout_tab[acmod]; + if (lfeon) + st->codec->channel_layout |= AV_CH_LOW_FREQUENCY; st->codec->audio_service_type = bsmod; if (st->codec->channels > 1 && bsmod == 0x7) st->codec->audio_service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE; |