Do not set pts in update_initial_durations() if stream has b frames.

Originally committed as revision 13639 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Michael Niedermayer 17 years ago
parent c9d1924884
commit 5853423c3f
  1. 4
      libavformat/utils.c

@ -645,7 +645,9 @@ static void update_initial_durations(AVFormatContext *s, AVStream *st, AVPacket
continue; continue;
if(pktl->pkt.pts == pktl->pkt.dts && pktl->pkt.dts == AV_NOPTS_VALUE if(pktl->pkt.pts == pktl->pkt.dts && pktl->pkt.dts == AV_NOPTS_VALUE
&& !pktl->pkt.duration){ && !pktl->pkt.duration){
pktl->pkt.pts= pktl->pkt.dts= st->cur_dts; pktl->pkt.dts= st->cur_dts;
if(!st->codec->has_b_frames)
pktl->pkt.pts= st->cur_dts;
st->cur_dts += pkt->duration; st->cur_dts += pkt->duration;
pktl->pkt.duration= pkt->duration; pktl->pkt.duration= pkt->duration;
}else }else

Loading…
Cancel
Save