diff options
author | Fabian Neundorf <CommodoreFabianus@gmx.de> | 2013-07-17 12:47:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-18 01:02:31 +0200 |
commit | 353f302250fd63a4d01dbdc0b6a5fa6b313ebbb7 (patch) | |
tree | 712abfbd18b6998c723cc23d102d12747b898237 | |
parent | a0b7e73f8baedda405ba0880957ccaaa5dde0479 (diff) | |
download | ffmpeg-353f302250fd63a4d01dbdc0b6a5fa6b313ebbb7.tar.gz |
lavf/matroskaenc: using valid chapter ids
Fixes ticket 2790, by starting the ChapterUIDs in mkv files with 1 instead of a 0.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/matroskaenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 9b825f78ed..dabef55daf 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -790,7 +790,7 @@ static int mkv_write_chapters(AVFormatContext *s) AVDictionaryEntry *t = NULL; chapteratom = start_ebml_master(pb, MATROSKA_ID_CHAPTERATOM, 0); - put_ebml_uint(pb, MATROSKA_ID_CHAPTERUID, c->id); + put_ebml_uint(pb, MATROSKA_ID_CHAPTERUID, c->id + 1); put_ebml_uint(pb, MATROSKA_ID_CHAPTERTIMESTART, av_rescale_q(c->start, c->time_base, scale)); put_ebml_uint(pb, MATROSKA_ID_CHAPTERTIMEEND, @@ -908,7 +908,7 @@ static int mkv_write_tags(AVFormatContext *s) if (!mkv_check_tag(ch->metadata)) continue; - ret = mkv_write_tag(s, ch->metadata, MATROSKA_ID_TAGTARGETS_CHAPTERUID, ch->id, &tags); + ret = mkv_write_tag(s, ch->metadata, MATROSKA_ID_TAGTARGETS_CHAPTERUID, ch->id + 1, &tags); if (ret < 0) return ret; } |