summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-17 00:08:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-18 19:19:47 +0200
commit28ff17fa9761706ec5f07c07ce9ff04816536749 (patch)
treefaeb4c0ae793125d1a4786da99d23ccf14aa4bf0 /libavformat/utils.c
parent92b8c9d89e7ae86bffa05393bb230d5a165b0148 (diff)
downloadffmpeg-28ff17fa9761706ec5f07c07ce9ff04816536749.tar.gz
lavf: add use_wallclock_as_timestamps
This may fix Ticket730 Reviewed-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d166d083dd..af1c2819e8 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -776,6 +776,9 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
if(s->subtitle_codec_id)st->codec->codec_id= s->subtitle_codec_id;
break;
}
+ /* TODO: audio: time filter; video: frame reordering (pts != dts) */
+ if (s->use_wallclock_as_timestamps)
+ pkt->dts = pkt->pts = av_rescale_q(av_gettime(), AV_TIME_BASE_Q, st->time_base);
if(!pktl && st->request_probe <= 0)
return ret;