summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-19 17:04:23 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-23 01:05:17 +0100
commit47d0b86cf3d83abdcf60c5c224bbf6f4a0198d5d (patch)
treef43ec20ce3b38614334ff572c56e35b87f6000af
parent2fccd8bfb967276e2b780c446fd7ff9210205cf5 (diff)
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>
-rw-r--r--libavformat/s337m.c1
-rw-r--r--tests/fate/demux.mak3
-rw-r--r--tests/ref/fate/s337m-demux31
3 files changed, 35 insertions, 0 deletions
diff --git a/libavformat/s337m.c b/libavformat/s337m.c
index 36e1047af8..9e3c8ed1ba 100644
--- a/libavformat/s337m.c
+++ b/libavformat/s337m.c
@@ -189,6 +189,7 @@ static int s337m_read_packet(AVFormatContext *s, AVPacket *pkt)
}
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_id = codec;
+ st->need_parsing = AVSTREAM_PARSE_HEADERS;
}
return 0;
diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak
index e5809bedd4..e9b8aeec0f 100644
--- a/tests/fate/demux.mak
+++ b/tests/fate/demux.mak
@@ -133,6 +133,9 @@ fate-qcp-demux: CMD = crc -i $(TARGET_SAMPLES)/qcp/0036580847.QCP -c:a copy
FATE_SAMPLES_DEMUX-$(CONFIG_R3D_DEMUXER) += fate-redcode-demux
fate-redcode-demux: CMD = framecrc -i $(TARGET_SAMPLES)/r3d/4MB-sample.r3d -c:v copy -c:a copy
+FATE_SAMPLES_DEMUX-$(call ALLYES, S337M_DEMUXER DOLBY_E_PARSER FRAMECRC_MUXER) += fate-s337m-demux
+fate-s337m-demux: CMD = framecrc -i $(TARGET_SAMPLES)/dolby_e/16-11 -c copy -ss 2 -t 1
+
FATE_SAMPLES_DEMUX-$(CONFIG_SIFF_DEMUXER) += fate-siff-demux
fate-siff-demux: CMD = framecrc -i $(TARGET_SAMPLES)/SIFF/INTRO_B.VB -c copy
diff --git a/tests/ref/fate/s337m-demux b/tests/ref/fate/s337m-demux
new file mode 100644
index 0000000000..2857c65aee
--- /dev/null
+++ b/tests/ref/fate/s337m-demux
@@ -0,0 +1,31 @@
+#tb 0: 1/90000
+#media_type 0: audio
+#codec_id 0: dolby_e
+#sample_rate 0: 44800
+#channel_layout 0: 60f
+#channel_layout_name 0: 5.1(side)
+0, 0, 0, 3600, 7664, 0x7e73f2fd
+0, 3600, 3600, 3600, 7664, 0x8b980ec8
+0, 7200, 7200, 3600, 7664, 0xa16adbd5
+0, 10800, 10800, 3600, 7664, 0x6d1b43a5
+0, 14400, 14400, 3600, 7664, 0xb7e52e2a
+0, 18000, 18000, 3600, 7664, 0xcb7d6463
+0, 21600, 21600, 3600, 7664, 0x148a557b
+0, 25200, 25200, 3600, 7664, 0x04c0142e
+0, 28800, 28800, 3600, 7664, 0xf96de1d4
+0, 32400, 32400, 3600, 7664, 0x9f3224e0
+0, 36000, 36000, 3600, 7664, 0x6bd905cb
+0, 39600, 39600, 3600, 7664, 0xe6782023
+0, 43200, 43200, 3600, 7664, 0x983f5048
+0, 46800, 46800, 3600, 7664, 0x017df49a
+0, 50400, 50400, 3600, 7664, 0x25e605a9
+0, 54000, 54000, 3600, 7664, 0x764ef01e
+0, 57600, 57600, 3600, 7664, 0x3830f9f0
+0, 61200, 61200, 3600, 7664, 0xbcd62352
+0, 64800, 64800, 3600, 7664, 0x51ab1a35
+0, 68400, 68400, 3600, 7664, 0xc21ff964
+0, 72000, 72000, 3600, 7664, 0x9d6c0efa
+0, 75600, 75600, 3600, 7664, 0x5e55dd80
+0, 79200, 79200, 3600, 7664, 0xfd9eeb6d
+0, 82800, 82800, 3600, 7664, 0xcf86ce9d
+0, 86400, 86400, 3600, 7664, 0xc6e8319c