[FFmpeg-devel] [PATCH 12/12] tests/fate: Add test for zero-length Block

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Mon Feb 15 23:02:27 EET 2021


Andreas Rheinhardt:
> It furthermore tests the demuxer's handling of chained SeekHeads,
> level 1-elements after the Clusters and the muxer's capability of
> writing huge TrackNumbers as well as expanding the Cues' length field
> by one byte if necessary to fill the reserved space. It also tests
> propagation of metadata.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  tests/fate/matroska.mak                   | 10 ++++++++++
>  tests/ref/fate/matroska-zero-length-block | 10 ++++++++++
>  2 files changed, 20 insertions(+)
>  create mode 100644 tests/ref/fate/matroska-zero-length-block
> 
> diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
> index 1d2921194f..101502f668 100644
> --- a/tests/fate/matroska.mak
> +++ b/tests/fate/matroska.mak
> @@ -57,6 +57,16 @@ FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, MATROSKA_DEMUXER OGG_DEMUXER  \
>                                 += fate-webm-dash-chapters
>  fate-webm-dash-chapters: CMD = transcode ogg $(TARGET_SAMPLES)/vorbis/vorbis_chapter_extension_demo.ogg webm "-c copy -cluster_time_limit 1500 -dash 1 -dash_track_number 124 -reserve_index_space 400" "-c copy -t 0.5" "" -show_chapters
>  
> +# The input file has a Block whose payload has a size of zero before reversing
> +# header removal compression; it furthermore uses chained SeekHeads and has
> +# level 1-elements after the Cluster. This is tested on the demuxer's side.
> +# For the muxer this tests that it can correctly write huge TrackNumbers and
> +# that it can expand the Cues element's length field by one byte if necessary.
> +# It furthermore tests correct propagation of the description tag.
> +FATE_MATROSKA_FFMPEG_FFPROBE-$(call DEMMUX, MATROSKA, MATROSKA) \
> +                               += fate-matroska-zero-length-block
> +fate-matroska-zero-length-block: CMD = transcode matroska $(TARGET_SAMPLES)/mkv/zero_length_block.mks matroska "-c:s copy -dash 1 -dash_track_number 2000000000 -reserve_index_space 62 -metadata_header_padding 1" "-c:s copy" "" "-show_entries stream_tags=description"
> +
>  FATE_MATROSKA_FFPROBE-$(call ALLYES, MATROSKA_DEMUXER) += fate-matroska-spherical-mono
>  fate-matroska-spherical-mono: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_entries stream_side_data_list -select_streams v -v 0 $(TARGET_SAMPLES)/mkv/spherical.mkv
>  
> diff --git a/tests/ref/fate/matroska-zero-length-block b/tests/ref/fate/matroska-zero-length-block
> new file mode 100644
> index 0000000000..8fae333a4d
> --- /dev/null
> +++ b/tests/ref/fate/matroska-zero-length-block
> @@ -0,0 +1,10 @@
> +46c2885959b8a72ac4f7a221ba456565 *tests/data/fate/matroska-zero-length-block.matroska
> +622 tests/data/fate/matroska-zero-length-block.matroska
> +#tb 0: 1/1000
> +#media_type 0: subtitle
> +#codec_id 0: subrip
> +0,       1000,       1000,     2000,        5, 0x05b801df
> +0,       3300,       3300,     3700,       16, 0x300705b2
> +[STREAM]
> +TAG:DESCRIPTION=This track uses header removal compression and has a Block of size zero before reversing it.
> +[/STREAM]
> 
Totally forgot about this one. It needs to be slightly modified because
the created file is now 21B larger due to
4ebfc13c338423cf48f1a1266c890422367f7775, but that's trivial. Will apply
it later.

- Andreas


More information about the ffmpeg-devel mailing list