diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-05-22 23:04:02 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-05-22 23:04:02 +0000 |
commit | ad9d62ef22de83b36fc7da009734292a209ab765 (patch) | |
tree | da8b49a8ec3935ad898d805af1a30cb925203874 | |
parent | f5275b3ce749ecb47c04fff49f8a29bcfbe13254 (diff) | |
download | ffmpeg-ad9d62ef22de83b36fc7da009734292a209ab765.tar.gz |
matroskadec: allows inserting chapters with unspecified end
Originally committed as revision 13242 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/matroskadec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 2b6f2ba494..b038267b5b 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2250,8 +2250,12 @@ matroska_parse_chapters(AVFormatContext *s) } } - if(start != AV_NOPTS_VALUE && end != AV_NOPTS_VALUE) - res = ff_new_chapter(s, start * AV_TIME_BASE / 1000000000 , end * AV_TIME_BASE / 1000000000, title ? title : "(unnamed)"); + if (start != AV_NOPTS_VALUE) { + start = start * AV_TIME_BASE / 1000000000; + if (end != AV_NOPTS_VALUE) + end = end * AV_TIME_BASE / 1000000000; + res = ff_new_chapter(s, start, end, title ? title : "(unnamed)"); + } av_free(title); break; |