[soc]: r4581 - concat/libavformat/m3u.c
Author: gkovacs Date: Sat Jul 4 09:43:31 2009 New Revision: 4581 Log: make pts equal dts + 1 to avoid invalid dts/pts combination error with mpeg1video in avi when dts equals pts Modified: concat/libavformat/m3u.c Modified: concat/libavformat/m3u.c ============================================================================== --- concat/libavformat/m3u.c Sat Jul 4 09:35:24 2009 (r4580) +++ concat/libavformat/m3u.c Sat Jul 4 09:43:31 2009 (r4581) @@ -122,7 +122,7 @@ static int m3u_read_packet(AVFormatConte if (pkt) { int64_t time_offset = ff_conv_stream_time(ic, pkt->stream_index, playld->time_offsets[pkt->stream_index]); pkt->dts += time_offset; - pkt->pts = pkt->dts; + pkt->pts = pkt->dts + 1; } } // TODO switch from AVERROR_EOF to AVERROR_EOS
Hi, gkovacs wrote:
Author: gkovacs Date: Sat Jul 4 09:43:31 2009 New Revision: 4581
Log: make pts equal dts + 1 to avoid invalid dts/pts combination error with mpeg1video in avi when dts equals pts
Modified: concat/libavformat/m3u.c
Modified: concat/libavformat/m3u.c ============================================================================== --- concat/libavformat/m3u.c Sat Jul 4 09:35:24 2009 (r4580) +++ concat/libavformat/m3u.c Sat Jul 4 09:43:31 2009 (r4581) @@ -122,7 +122,7 @@ static int m3u_read_packet(AVFormatConte if (pkt) { int64_t time_offset = ff_conv_stream_time(ic, pkt->stream_index, playld->time_offsets[pkt->stream_index]); pkt->dts += time_offset; - pkt->pts = pkt->dts; + pkt->pts = pkt->dts + 1;
pts might not be set, ie AV_NOPTS_VALUE, and this depends on has_b_frames, since stream might be low delay for other codecs than mpeg1. Also you have av_rescale/av_rescale_q to rescale times. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org
participants (2)
-
Baptiste Coudurier -
gkovacs