[FFmpeg-cvslog] r13519 - trunk/libavformat/movenc.c
bcoudurier
subversion
Thu May 29 02:58:41 CEST 2008
Author: bcoudurier
Date: Thu May 29 02:58:41 2008
New Revision: 13519
Log:
warn if pts is not set, prevent writing negative/weird cts, happens when using genpts and streamcopy
Modified:
trunk/libavformat/movenc.c
Modified: trunk/libavformat/movenc.c
==============================================================================
--- trunk/libavformat/movenc.c (original)
+++ trunk/libavformat/movenc.c Thu May 29 02:58:41 2008
@@ -1607,6 +1607,10 @@ static int mov_write_packet(AVFormatCont
trk->cluster[trk->entry].dts = pkt->dts;
trk->trackDuration = pkt->dts - trk->cluster[0].dts + pkt->duration;
+ if (pkt->pts == AV_NOPTS_VALUE) {
+ av_log(s, AV_LOG_WARNING, "pts has no value\n");
+ pkt->pts = pkt->dts;
+ }
if (pkt->dts != pkt->pts)
trk->hasBframes = 1;
trk->cluster[trk->entry].cts = pkt->pts - pkt->dts;
More information about the ffmpeg-cvslog
mailing list