1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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; AVIOContext *pb = s->pb;
AVPacketList *pict_list = aiff->pict_list; AVPacketList *pict_list = aiff->pict_list;
if (!s->metadata && !aiff->pict_list) if (!s->metadata && !s->nb_chapters && !aiff->pict_list)
return 0; return 0;
avio_wl32(pb, MKTAG('I', 'D', '3', ' ')); avio_wl32(pb, MKTAG('I', 'D', '3', ' '));