From ff9c8d7c6f58e052e4efae6e24defe08f956b03f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 Aug 2008 16:13:05 +0000 Subject: [PATCH] Add flag to mark demuxers that can output discontinuous timestamps. (could also be added to muxers if someone wants) Originally committed as revision 14777 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/avformat.h | 1 + libavformat/mpeg.c | 2 +- libavformat/mpegts.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 4ed35227c0..9c6168597b 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -187,6 +187,7 @@ typedef struct AVFormatParameters { #define AVFMT_GLOBALHEADER 0x0040 /**< format wants global header */ #define AVFMT_NOTIMESTAMPS 0x0080 /**< format does not need / have any timestamps */ #define AVFMT_GENERIC_INDEX 0x0100 /**< use generic index building code */ +#define AVFMT_TS_DISCONT 0x0200 /**< format allows timestamo discontinuities */ typedef struct AVOutputFormat { const char *name; diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 78fceee373..fc98ab82b2 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -586,5 +586,5 @@ AVInputFormat mpegps_demuxer = { NULL, NULL, //mpegps_read_seek, mpegps_read_dts, - .flags = AVFMT_SHOW_IDS, + .flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT, }; diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index a8d60ea469..80b604c5ae 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1524,7 +1524,7 @@ AVInputFormat mpegts_demuxer = { mpegts_read_close, read_seek, mpegts_get_pcr, - .flags = AVFMT_SHOW_IDS, + .flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT, }; AVInputFormat mpegtsraw_demuxer = { @@ -1537,5 +1537,5 @@ AVInputFormat mpegtsraw_demuxer = { mpegts_read_close, read_seek, mpegts_get_pcr, - .flags = AVFMT_SHOW_IDS, + .flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT, };