summaryrefslogtreecommitdiff
path: root/libavformat/mpegts.c
diff options
context:
space:
mode:
authorRafaël Carré <funman@videolan.org>2014-12-05 14:33:58 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-05 16:00:11 +0100
commit57bfafe76be58c269ce1c12d30e0e2dc8ae2249b (patch)
tree20dbc1930e81f363920798b27629733ab7ec01c0 /libavformat/mpegts.c
parenta7ebd0b011f9576c843a86bd6a1828ecaa6faf3a (diff)
avformat/mpegts: fix Opus stream count
That number represents the number of streams, not the number of channels Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r--libavformat/mpegts.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 97da0a3f57..f4250c84c6 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1758,10 +1758,9 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
if (channel_config_code <= 0x8) {
st->codec->extradata[9] = channels = channel_config_code ? channel_config_code : 2;
st->codec->extradata[18] = channels > 2;
- st->codec->extradata[19] = channel_config_code;
+ st->codec->extradata[19] = channels - opus_coupled_stream_cnt[channel_config_code];
if (channel_config_code == 0) { /* Dual Mono */
st->codec->extradata[18] = 255; /* Mapping */
- st->codec->extradata[19] = 2; /* Stream Count */
}
st->codec->extradata[20] = opus_coupled_stream_cnt[channel_config_code];
memcpy(&st->codec->extradata[21], opus_channel_map[channels - 1], channels);