summaryrefslogtreecommitdiff
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-10-07 01:55:34 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-10-07 01:55:34 +0000
commit6c55b27f8f7b41c34ecaf1c7986f23809adc80e0 (patch)
tree19c241302d769d88733dabe6a710ed7e79fa5d39 /libavformat/mpeg.c
parent61c1d8e2b64f756ed4ee731ca18dc0ac426a21ef (diff)
do not randomize unknown timestamps
Originally committed as revision 3568 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 4f8d20dc6a..772a4df30e 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -1029,13 +1029,13 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
and the first pack from the other stream, respectively, may also have
been written before.
So the real data starts at SCR 36000+3*1200. */
- pts += 36000 + 3600;
- dts += 36000 + 3600;
+ if(pts != AV_NOPTS_VALUE) pts += 36000 + 3600;
+ if(dts != AV_NOPTS_VALUE) dts += 36000 + 3600;
}else{
- pts += PRELOAD;
- dts += PRELOAD;
+ if(pts != AV_NOPTS_VALUE) pts += PRELOAD;
+ if(dts != AV_NOPTS_VALUE) dts += PRELOAD;
}
-//av_log(ctx, AV_LOG_DEBUG, "dts:%f pts:%f flags:%d stream:%d\n", dts/90000.0, pts/90000.0, pkt->flags, pkt->stream_index);
+//av_log(ctx, AV_LOG_DEBUG, "dts:%f pts:%f flags:%d stream:%d nopts:%d\n", dts/90000.0, pts/90000.0, pkt->flags, pkt->stream_index, pts != AV_NOPTS_VALUE);
*stream->next_packet=
pkt_desc= av_mallocz(sizeof(PacketDesc));
pkt_desc->pts= pts;