Skip to content
Snippets Groups Projects
Commit 10a7571b authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

deal with the case where one of pts,dts has wrapped but the other has not

Originally committed as revision 9839 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 29d2dc59
No related branches found
No related tags found
No related merge requests found
...@@ -595,6 +595,11 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, ...@@ -595,6 +595,11 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
int num, den, presentation_delayed, delay, i; int num, den, presentation_delayed, delay, i;
int64_t offset; int64_t offset;
if(pkt->pts != AV_NOPTS_VALUE && pkt->dts != AV_NOPTS_VALUE && pkt->dts > pkt->pts && st->pts_wrap_bits<63
/*&& pkt->dts-(1LL<<st->pts_wrap_bits) < pkt->pts*/){
pkt->dts -= 1LL<<st->pts_wrap_bits;
}
if (pkt->duration == 0) { if (pkt->duration == 0) {
compute_frame_duration(&num, &den, st, pc, pkt); compute_frame_duration(&num, &den, st, pc, pkt);
if (den && num) { if (den && num) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment