History

avformat/mpegts: add missing sample_rate value to Opus extradata

Finishes fixing ticket #9190.

James Almer committed 5 years ago

Commit c1fd4031 parent bc010612 files · +2 −1Browse files

Unified · Split

2 files
  1. libavformat/mpegts.c +1 −0
  2. tests/ref/fate/ts-opus-demux +1 −1
libavformat/mpegts.c+1−0
@@ -2026,6 +2026,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type · 2025 unmodified lines
2026 return AVERROR_INVALIDDATA;2026 return AVERROR_INVALIDDATA;
2027 if (channel_config_code <= 0x8) {2027 if (channel_config_code <= 0x8) {
2028 st->codecpar->extradata[9] = channels = channel_config_code ? channel_config_code : 2;2028 st->codecpar->extradata[9] = channels = channel_config_code ? channel_config_code : 2;
2029 AV_WL32(&st->codecpar->extradata[12], 48000);
2029 st->codecpar->extradata[18] = channel_config_code ? (channels > 2) : /* Dual Mono */ 255;2030 st->codecpar->extradata[18] = channel_config_code ? (channels > 2) : /* Dual Mono */ 255;
2030 st->codecpar->extradata[19] = opus_stream_cnt[channel_config_code];2031 st->codecpar->extradata[19] = opus_stream_cnt[channel_config_code];
2031 st->codecpar->extradata[20] = opus_coupled_stream_cnt[channel_config_code];2032 st->codecpar->extradata[20] = opus_coupled_stream_cnt[channel_config_code];
tests/ref/fate/ts-opus-demux+1−1
@@ -1,4 +1,4 @@
1#extradata 0: 30, 0x53be03471#extradata 0: 30, 0x69290482
2#tb 0: 1/900002#tb 0: 1/90000
3#media_type 0: audio3#media_type 0: audio
4#codec_id 0: opus4#codec_id 0: opus

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t