[FFmpeg-cvslog] lavf/utils: run update_initial_timestamps() outside some if()
Michael Niedermayer
git at videolan.org
Fri Aug 24 03:32:47 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Aug 24 03:07:03 2012 +0200| [254917f078c7723305351624529f744309f33a0f] | committer: Michael Niedermayer
lavf/utils: run update_initial_timestamps() outside some if()
This way it gets executed earlier and updated timestamps become available earlier.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=254917f078c7723305351624529f744309f33a0f
---
libavformat/utils.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 251cd11..0b46244 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1138,12 +1138,12 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
FFSWAP(int64_t, st->pts_buffer[i], st->pts_buffer[i+1]);
if(pkt->dts == AV_NOPTS_VALUE)
pkt->dts= st->pts_buffer[0];
- if(st->codec->codec_id == AV_CODEC_ID_H264){ // we skipped it above so we try here
- update_initial_timestamps(s, pkt->stream_index, pkt->dts, pkt->pts); // this should happen on the first packet
- }
- if(pkt->dts > st->cur_dts)
- st->cur_dts = pkt->dts;
}
+ if(st->codec->codec_id == AV_CODEC_ID_H264){ // we skipped it above so we try here
+ update_initial_timestamps(s, pkt->stream_index, pkt->dts, pkt->pts); // this should happen on the first packet
+ }
+ if(pkt->dts > st->cur_dts)
+ st->cur_dts = pkt->dts;
// av_log(NULL, AV_LOG_ERROR, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s\n",
// presentation_delayed, delay, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts));
More information about the ffmpeg-cvslog
mailing list