mpegtsmux: only write PTS and DTS if different
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Sat, 16 Jun 2012 14:50:36 +0000 (16:50 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Sat, 16 Jun 2012 17:23:00 +0000 (19:23 +0200)
gst/mpegtsmux/tsmux/tsmuxstream.c

index ecc0be8..58d8609 100644 (file)
@@ -391,7 +391,7 @@ tsmux_stream_initialize_pes_packet (TsMuxStream * stream)
   stream->pi.flags &= ~(TSMUX_PACKET_FLAG_PES_WRITE_PTS_DTS |
       TSMUX_PACKET_FLAG_PES_WRITE_PTS);
 
-  if (stream->pts != -1 && stream->dts != -1)
+  if (stream->pts != -1 && stream->dts != -1 && stream->pts != stream->dts)
     stream->pi.flags |= TSMUX_PACKET_FLAG_PES_WRITE_PTS_DTS;
   else {
     if (stream->pts != -1)