[FFmpeg-devel] [PATCH] fate/matroska: Add test for updating CodecPrivate from packet sidedata

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Apr 1 22:20:42 EEST 2020


Am Mi., 1. Apr. 2020 um 21:19 Uhr schrieb Andreas Rheinhardt
<andreas.rheinhardt at gmail.com>:
>
> Carl Eugen Hoyos:
> > Am Mi., 1. Apr. 2020 um 20:42 Uhr schrieb Andreas Rheinhardt
> > <andreas.rheinhardt at gmail.com>:
> >>
> >> containing updated extradata, in this case a new FLAC streaminfo.
> >> Furthermore, it also tests that the Matroska muxer is able to preserve
> >> uncommon channel layouts by adding Vorbis comments to the CodecPrivate.
> >>
> >> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> >> ---
> >> This is in particular intended to test patch [1] (using fewer frames
> >> for the last track ensures that (after the removal of the seekbacks in
> >> mkv_check_new_extra_data()) the end position won't be at the end of the
> >> buffer when writing the final version of the Tracks element; but this
> >> won't be a problem after the switch to avio_get_dyn_buf() in the commit
> >> before [1].)
> >>
> >> [1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-January/256208.html
> >>
> >>  tests/fate/matroska.mak                       | 12 +++++
> >>  tests/ref/fate/matroska-flac-extradata-update | 53 +++++++++++++++++++
> >>  2 files changed, 65 insertions(+)
> >>  create mode 100644 tests/ref/fate/matroska-flac-extradata-update
> >>
> >> diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
> >> index b9ed7322fd..02f2ea211f 100644
> >> --- a/tests/fate/matroska.mak
> >> +++ b/tests/fate/matroska.mak
> >> @@ -32,6 +32,18 @@ fate-matroska-lzo-decompression: CMD = framecrc -i $(TARGET_SAMPLES)/mkv/lzo.mka
> >>  FATE_MATROSKA-$(call ALLYES, MATROSKA_DEMUXER FLAC_PARSER) += fate-matroska-flac-channel-mapping
> >>  fate-matroska-flac-channel-mapping: CMD = framecrc -i $(TARGET_SAMPLES)/mkv/flac_channel_layouts.mka -map 0 -c:a copy
> >>
> >> +# This tests that the Matroska muxer writes the channel layout
> >> +# of FLAC tracks as a Vorbis comment in the CodecPrivate if necessary
> >> +# and that FLAC extradata is correctly updated when a packet
> >> +# with sidedata containing new extradata is encountered.
> >> +# Furthermore it tests everything the matroska-flac-channel-mapping test
> >> +# tests and it also tests the FLAC decoder and encoder, in particular
> >> +# the latter's ability to send updated extradata.
> >> +FATE_MATROSKA-$(call ALLYES, FLAC_DECODER FLAC_ENCODER FLAC_PARSER \
> >> +                MATROSKA_DEMUXER MATROSKA_MUXER) += fate-matroska-flac-extradata-update
> >> +fate-matroska-flac-extradata-update: CMD = transcode matroska $(TARGET_SAMPLES)/mkv/flac_channel_layouts.mka \
> >> +                                           matroska "-map 0 -map 0:0 -c flac -frames:a:2 8" "-map 0 -c copy"
> >
> > What effect does "-map 0 -map 0:0" have?
> >
> -map 0 adds all streams of the input file to output and map 0:0 adds the
> first input stream again. flac_channel_layouts.mka has two streams and
> therefore there will be three output streams: The common source of the
> first and third stream is the first input stream, the second stream has
> the second input stream as source.

Of course.

Thank you, Carl Eugen


More information about the ffmpeg-devel mailing list