Skip to content

Commit 47d0b86

Browse files
committed
avformat/s337m: Use and test Dolby-E-parser
This makes av_read_frame() return packets with proper timestamps. As a result, seeking now works in combination with streamcopy. A FATE-test for this has been added. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
1 parent 2fccd8b commit 47d0b86

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

libavformat/s337m.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ static int s337m_read_packet(AVFormatContext *s, AVPacket *pkt)
189189
}
190190
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
191191
st->codecpar->codec_id = codec;
192+
st->need_parsing = AVSTREAM_PARSE_HEADERS;
192193
}
193194

194195
return 0;

tests/fate/demux.mak

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ fate-qcp-demux: CMD = crc -i $(TARGET_SAMPLES)/qcp/0036580847.QCP -c:a copy
133133
FATE_SAMPLES_DEMUX-$(CONFIG_R3D_DEMUXER) += fate-redcode-demux
134134
fate-redcode-demux: CMD = framecrc -i $(TARGET_SAMPLES)/r3d/4MB-sample.r3d -c:v copy -c:a copy
135135

136+
FATE_SAMPLES_DEMUX-$(call ALLYES, S337M_DEMUXER DOLBY_E_PARSER FRAMECRC_MUXER) += fate-s337m-demux
137+
fate-s337m-demux: CMD = framecrc -i $(TARGET_SAMPLES)/dolby_e/16-11 -c copy -ss 2 -t 1
138+
136139
FATE_SAMPLES_DEMUX-$(CONFIG_SIFF_DEMUXER) += fate-siff-demux
137140
fate-siff-demux: CMD = framecrc -i $(TARGET_SAMPLES)/SIFF/INTRO_B.VB -c copy
138141

tests/ref/fate/s337m-demux

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#tb 0: 1/90000
2+
#media_type 0: audio
3+
#codec_id 0: dolby_e
4+
#sample_rate 0: 44800
5+
#channel_layout 0: 60f
6+
#channel_layout_name 0: 5.1(side)
7+
0, 0, 0, 3600, 7664, 0x7e73f2fd
8+
0, 3600, 3600, 3600, 7664, 0x8b980ec8
9+
0, 7200, 7200, 3600, 7664, 0xa16adbd5
10+
0, 10800, 10800, 3600, 7664, 0x6d1b43a5
11+
0, 14400, 14400, 3600, 7664, 0xb7e52e2a
12+
0, 18000, 18000, 3600, 7664, 0xcb7d6463
13+
0, 21600, 21600, 3600, 7664, 0x148a557b
14+
0, 25200, 25200, 3600, 7664, 0x04c0142e
15+
0, 28800, 28800, 3600, 7664, 0xf96de1d4
16+
0, 32400, 32400, 3600, 7664, 0x9f3224e0
17+
0, 36000, 36000, 3600, 7664, 0x6bd905cb
18+
0, 39600, 39600, 3600, 7664, 0xe6782023
19+
0, 43200, 43200, 3600, 7664, 0x983f5048
20+
0, 46800, 46800, 3600, 7664, 0x017df49a
21+
0, 50400, 50400, 3600, 7664, 0x25e605a9
22+
0, 54000, 54000, 3600, 7664, 0x764ef01e
23+
0, 57600, 57600, 3600, 7664, 0x3830f9f0
24+
0, 61200, 61200, 3600, 7664, 0xbcd62352
25+
0, 64800, 64800, 3600, 7664, 0x51ab1a35
26+
0, 68400, 68400, 3600, 7664, 0xc21ff964
27+
0, 72000, 72000, 3600, 7664, 0x9d6c0efa
28+
0, 75600, 75600, 3600, 7664, 0x5e55dd80
29+
0, 79200, 79200, 3600, 7664, 0xfd9eeb6d
30+
0, 82800, 82800, 3600, 7664, 0xcf86ce9d
31+
0, 86400, 86400, 3600, 7664, 0xc6e8319c

0 commit comments

Comments
 (0)