comparison utils.c @ 3417:e38326ffbb5e libavformat

Do not set pts in update_initial_durations() if stream has b frames.
author michael
date Tue, 03 Jun 2008 00:43:56 +0000
parents 17074236eb14
children 1e1c7967ba6c
comparison
equal deleted inserted replaced
3416:f386245ae6f7 3417:e38326ffbb5e
643 for(; pktl; pktl= pktl->next){ 643 for(; pktl; pktl= pktl->next){
644 if(pktl->pkt.stream_index != pkt->stream_index) 644 if(pktl->pkt.stream_index != pkt->stream_index)
645 continue; 645 continue;
646 if(pktl->pkt.pts == pktl->pkt.dts && pktl->pkt.dts == AV_NOPTS_VALUE 646 if(pktl->pkt.pts == pktl->pkt.dts && pktl->pkt.dts == AV_NOPTS_VALUE
647 && !pktl->pkt.duration){ 647 && !pktl->pkt.duration){
648 pktl->pkt.pts= pktl->pkt.dts= st->cur_dts; 648 pktl->pkt.dts= st->cur_dts;
649 if(!st->codec->has_b_frames)
650 pktl->pkt.pts= st->cur_dts;
649 st->cur_dts += pkt->duration; 651 st->cur_dts += pkt->duration;
650 pktl->pkt.duration= pkt->duration; 652 pktl->pkt.duration= pkt->duration;
651 }else 653 }else
652 break; 654 break;
653 } 655 }