[FFmpeg-soc] [soc]: r4599 - concat/libavformat/concatgen.c

gkovacs subversion at mplayerhq.hu
Sat Jul 4 22:30:09 CEST 2009


Author: gkovacs
Date: Sat Jul  4 22:30:09 2009
New Revision: 4599

Log:
only set pts if codec doesn't use b-frames

Modified:
   concat/libavformat/concatgen.c

Modified: concat/libavformat/concatgen.c
==============================================================================
--- concat/libavformat/concatgen.c	Sat Jul  4 22:24:57 2009	(r4598)
+++ concat/libavformat/concatgen.c	Sat Jul  4 22:30:09 2009	(r4599)
@@ -42,7 +42,8 @@ int concatgen_read_packet(AVFormatContex
         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 + 1;
+            if (!ic->streams[pkt->stream_index]->codec->has_b_frames)
+                pkt->pts = pkt->dts + 1;
         }
     }
     // TODO switch from AVERROR_EOF to AVERROR_EOS


More information about the FFmpeg-soc mailing list