]> git.sesse.net Git - ffmpeg/commitdiff
avformat/mpegts: add missing sample_rate value to Opus extradata
authorJames Almer <jamrial@gmail.com>
Thu, 15 Apr 2021 13:03:05 +0000 (10:03 -0300)
committerJames Almer <jamrial@gmail.com>
Fri, 16 Apr 2021 14:08:40 +0000 (11:08 -0300)
Finishes fixing ticket #9190.

Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/mpegts.c
tests/ref/fate/ts-opus-demux

index 6e0d9d74963b3325a0800f55c4c233414c785101..2c3b9be4348f014ef551d553f22fd497a42cbf0d 100644 (file)
@@ -2026,6 +2026,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
                     return AVERROR_INVALIDDATA;
                 if (channel_config_code <= 0x8) {
                     st->codecpar->extradata[9]  = channels = channel_config_code ? channel_config_code : 2;
+                    AV_WL32(&st->codecpar->extradata[12], 48000);
                     st->codecpar->extradata[18] = channel_config_code ? (channels > 2) : /* Dual Mono */ 255;
                     st->codecpar->extradata[19] = opus_stream_cnt[channel_config_code];
                     st->codecpar->extradata[20] = opus_coupled_stream_cnt[channel_config_code];
index 3c5edffb2cc667915e1f16fc5b02083f02458102..37534350a1f0d9fefd11f7cea9760bc4cbce43da 100644 (file)
@@ -1,4 +1,4 @@
-#extradata 0:       30, 0x53be0347
+#extradata 0:       30, 0x69290482
 #tb 0: 1/90000
 #media_type 0: audio
 #codec_id 0: opus