avformat/aiffenc: Don't forget chapters

If the write_id3v2 option is set, the aiff muxer would write id3v2 tags
if there is global metadata or if there are attached pics to write.
Chapters are ignored in this check that precedes writing id3v2 tags.
Yet 47ac344970 added support for writing
chapters as id3v2 tags, so one should check for the existence of chapters,
too; otherwise the chapters would only be written in case there is
global metadata or an attached pic.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2020-05-19 06:10:27 +02:00
parent c7c8f141eb
commit 1ebbb493cc

View File

@ -49,7 +49,7 @@ static int put_id3v2_tags(AVFormatContext *s, AIFFOutputContext *aiff)
AVIOContext *pb = s->pb;
AVPacketList *pict_list = aiff->pict_list;
if (!s->metadata && !aiff->pict_list)
if (!s->metadata && !s->nb_chapters && !aiff->pict_list)
return 0;
avio_wl32(pb, MKTAG('I', 'D', '3', ' '));