avformat/id3v2enc: fix bug, CTOC flags take only one byte

This commit is contained in:
Paul B Mahol 2019-06-13 23:11:10 +02:00
parent 7c2c5c4940
commit 6473a5d35c

View File

@ -269,7 +269,7 @@ static int write_ctoc(AVFormatContext *s, ID3v2EncContext *id3, int enc)
goto fail;
id3->len += avio_put_str(dyn_bc, "toc");
avio_wb16(dyn_bc, 0x03);
avio_w8(dyn_bc, 0x03);
avio_w8(dyn_bc, s->nb_chapters);
for (int i = 0; i < s->nb_chapters; i++) {
snprintf(name, 122, "ch%d", i);