Commit 7764dd1d authored by michael's avatar michael

Warn user about invalid timestamps.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13264 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 31429e01
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment