[FFmpeg-devel] [PATCH 3/3] lavf/matroskaenc: use mkv_check_tag_name consistently; update test

Michael Niedermayer michael at niedermayer.cc
Wed Sep 7 00:25:14 EEST 2016


On Mon, Sep 05, 2016 at 10:26:28PM -0500, Rodger Combs wrote:
> ---
>  libavformat/matroskaenc.c | 10 +++++-----
>  tests/fate/matroska.mak   |  2 +-
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 7deccaa..3eeb09b 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -1342,12 +1342,12 @@ static int mkv_write_tag(AVFormatContext *s, AVDictionary *m, unsigned int eleme
>      return 0;
>  }
>  
> -static int mkv_check_tag(AVDictionary *m)
> +static int mkv_check_tag(AVDictionary *m, unsigned int elementid)
>  {
>      AVDictionaryEntry *t = NULL;
>  
>      while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX)))
> -        if (av_strcasecmp(t->key, "title") && av_strcasecmp(t->key, "stereo_mode"))
> +        if (mkv_check_tag_name(t->key, elementid))
>              return 1;
>  
>      return 0;
> @@ -1361,7 +1361,7 @@ static int mkv_write_tags(AVFormatContext *s)
>  
>      ff_metadata_conv_ctx(s, ff_mkv_metadata_conv, NULL);
>  
> -    if (mkv_check_tag(s->metadata)) {
> +    if (mkv_check_tag(s->metadata, 0)) {
>          ret = mkv_write_tag(s, s->metadata, 0, 0, &tags);
>          if (ret < 0) return ret;
>      }
> @@ -1369,7 +1369,7 @@ static int mkv_write_tags(AVFormatContext *s)
>      for (i = 0; i < s->nb_streams; i++) {
>          AVStream *st = s->streams[i];
>  
> -        if (!mkv_check_tag(st->metadata))
> +        if (!mkv_check_tag(st->metadata, MATROSKA_ID_TAGTARGETS_TRACKUID))
>              continue;
>  
>          ret = mkv_write_tag(s, st->metadata, MATROSKA_ID_TAGTARGETS_TRACKUID, i + 1, &tags);
> @@ -1398,7 +1398,7 @@ static int mkv_write_tags(AVFormatContext *s)
>      for (i = 0; i < s->nb_chapters; i++) {
>          AVChapter *ch = s->chapters[i];
>  
> -        if (!mkv_check_tag(ch->metadata))
> +        if (!mkv_check_tag(ch->metadata, MATROSKA_ID_TAGTARGETS_CHAPTERUID))
>              continue;
>  
>          ret = mkv_write_tag(s, ch->metadata, MATROSKA_ID_TAGTARGETS_CHAPTERUID, ch->id + mkv->chapter_id_offset, &tags);
> diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
> index 8cf1734..8e4a1e8 100644
> --- a/tests/fate/matroska.mak
> +++ b/tests/fate/matroska.mak
> @@ -4,6 +4,6 @@
>  FATE_MATROSKA-$(call DEMMUX, MATROSKA, MATROSKA) += fate-matroska-remux
>  fate-matroska-remux: CMD = md5 -i $(TARGET_SAMPLES)/vp9-test-vectors/vp90-2-2pass-akiyo.webm -color_trc 4 -c:v copy -fflags +bitexact -strict -2 -f matroska
>  fate-matroska-remux: CMP = oneline
> -fate-matroska-remux: REF = 5ebcfaa8e3d534f8a800a58fd2b0aca6
> +fate-matroska-remux: REF = f08b20b90f158a4de5a02a52c25596b9

Please explain in the commit message why the checksum changes as well
as what effect this commit has

the commit message is a bit terse ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160906/e1487c42/attachment.sig>


More information about the ffmpeg-devel mailing list