aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-05-23 17:52:42 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-05-23 17:52:42 +0000
commitb18a4ab2ae1536f98b7f5e89b66e465187fcc71b (patch)
tree4baa1769b7553d398fa245e2998ca4f4c893512a /libavformat
parent883fe4d5bb3f47e70d251b1dc112980b4587606f (diff)
downloadffmpeg-b18a4ab2ae1536f98b7f5e89b66e465187fcc71b.tar.gz
Warn user about invalid timestamps.
Originally committed as revision 13264 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 73c28e72ab..e37577dbd7 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -850,6 +850,18 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
return ret;
}
+ if(s->cur_pkt.pts != AV_NOPTS_VALUE &&
+ s->cur_pkt.dts != AV_NOPTS_VALUE &&
+ s->cur_pkt.pts < s->cur_pkt.dts){
+ av_log(s, AV_LOG_WARNING, "Invalid timestamps stream=%d, pts=%"PRId64", dts=%"PRId64", size=%d\n",
+ s->cur_pkt.stream_index,
+ s->cur_pkt.pts,
+ s->cur_pkt.dts,
+ s->cur_pkt.size);
+// av_free_packet(&s->cur_pkt);
+// return -1;
+ }
+
st = s->streams[s->cur_pkt.stream_index];
if(st->codec->debug & FF_DEBUG_PTS)
av_log(s, AV_LOG_DEBUG, "av_read_packet stream=%d, pts=%"PRId64", dts=%"PRId64", size=%d\n",