comparison utils.c @ 3502:322e2fb56ce8 libavformat

Fill missing pts in during muxing when we know that they are equal to dts.
author michael
date Wed, 25 Jun 2008 18:31:48 +0000
parents efcdb01aa0bf
children c1c3fb1711b9
comparison
equal deleted inserted replaced
3501:efcdb01aa0bf 3502:322e2fb56ce8
2443 if (den && num) { 2443 if (den && num) {
2444 pkt->duration = av_rescale(1, num * (int64_t)st->time_base.den, den * (int64_t)st->time_base.num); 2444 pkt->duration = av_rescale(1, num * (int64_t)st->time_base.den, den * (int64_t)st->time_base.num);
2445 } 2445 }
2446 } 2446 }
2447 2447
2448 if(pkt->pts == AV_NOPTS_VALUE && pkt->dts != AV_NOPTS_VALUE && delay==0)
2449 pkt->pts= pkt->dts;
2450
2448 //XXX/FIXME this is a temporary hack until all encoders output pts 2451 //XXX/FIXME this is a temporary hack until all encoders output pts
2449 if((pkt->pts == 0 || pkt->pts == AV_NOPTS_VALUE) && pkt->dts == AV_NOPTS_VALUE && !delay){ 2452 if((pkt->pts == 0 || pkt->pts == AV_NOPTS_VALUE) && pkt->dts == AV_NOPTS_VALUE && !delay){
2450 pkt->dts= 2453 pkt->dts=
2451 // pkt->pts= st->cur_dts; 2454 // pkt->pts= st->cur_dts;
2452 pkt->pts= st->pts.val; 2455 pkt->pts= st->pts.val;