aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2014-12-15 18:42:41 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-15 20:00:35 +0100
commitacbc2ed26ab6d1f3fbd0db3c594672561a692d99 (patch)
tree9e4b2f8b4a709fe2cec1cd5ad62a8747788ee29a /libavformat
parent9887e7df9b899769644e833eca3f26a9f7fbe2b7 (diff)
downloadffmpeg-acbc2ed26ab6d1f3fbd0db3c594672561a692d99.tar.gz
lavf/concatdec: handle NOPTS start_time.
Fix trac ticket #3598. Signed-off-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/concatdec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index a2584d70e2..e109524de1 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -478,7 +478,7 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt)
{
ConcatContext *cat = avf->priv_data;
int ret;
- int64_t delta;
+ int64_t file_start_time, delta;
ConcatStream *cs;
AVStream *st;
@@ -512,7 +512,10 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt)
av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &st->time_base),
av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &st->time_base));
- delta = av_rescale_q(cat->cur_file->start_time - cat->avf->start_time,
+ file_start_time = cat->avf->start_time;
+ if (file_start_time == AV_NOPTS_VALUE)
+ file_start_time = 0;
+ delta = av_rescale_q(cat->cur_file->start_time - file_start_time,
AV_TIME_BASE_Q,
cat->avf->streams[pkt->stream_index]->time_base);
if (pkt->pts != AV_NOPTS_VALUE)