aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-01-22 14:12:22 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-03-21 20:15:31 +0100
commit2a4f1d38d95731ea1da1f57fe51efd560b274963 (patch)
treefa3bc3712bab05fb55dd56698bccd1c25c3d466c
parent89411ae699c87c46d156e82109dce9626963e6d7 (diff)
downloadffmpeg-2a4f1d38d95731ea1da1f57fe51efd560b274963.tar.gz
Print a warning when using wild guesses as time stamps.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
-rw-r--r--libavformat/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 2921e85c8f..77ac18059e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3227,6 +3227,11 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){
//XXX/FIXME this is a temporary hack until all encoders output pts
if((pkt->pts == 0 || pkt->pts == AV_NOPTS_VALUE) && pkt->dts == AV_NOPTS_VALUE && !delay){
+ static int warned;
+ if (!warned) {
+ av_log(s, AV_LOG_WARNING, "Encoder did not produce proper pts, making some up.\n");
+ warned = 1;
+ }
pkt->dts=
// pkt->pts= st->cur_dts;
pkt->pts= st->pts.val;