diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-06-03 00:43:56 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-06-03 00:43:56 +0000 |
commit | 5853423c3f514dcc72870930544f9fab7c0f5f20 (patch) | |
tree | 0eba9dd1dae6114799bf518cf7b1165183c8a09e | |
parent | c9d19248844e72b0f6a11847dcc59349d1b6558b (diff) | |
download | ffmpeg-streaming-5853423c3f514dcc72870930544f9fab7c0f5f20.zip ffmpeg-streaming-5853423c3f514dcc72870930544f9fab7c0f5f20.tar.gz |
Do not set pts in update_initial_durations() if stream has b frames.
Originally committed as revision 13639 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 95abbe2..47324ea 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -645,7 +645,9 @@ static void update_initial_durations(AVFormatContext *s, AVStream *st, AVPacket continue; if(pktl->pkt.pts == pktl->pkt.dts && pktl->pkt.dts == AV_NOPTS_VALUE && !pktl->pkt.duration){ - pktl->pkt.pts= pktl->pkt.dts= st->cur_dts; + pktl->pkt.dts= st->cur_dts; + if(!st->codec->has_b_frames) + pktl->pkt.pts= st->cur_dts; st->cur_dts += pkt->duration; pktl->pkt.duration= pkt->duration; }else |