[FFmpeg-cvslog] r22371 - trunk/libavformat/matroskaenc.c

conrad subversion
Tue Mar 9 05:23:33 CET 2010


Author: conrad
Date: Tue Mar  9 05:23:33 2010
New Revision: 22371

Log:
mkvenc: Don't try to write packets with unknown timestamps

Modified:
   trunk/libavformat/matroskaenc.c

Modified: trunk/libavformat/matroskaenc.c
==============================================================================
--- trunk/libavformat/matroskaenc.c	Tue Mar  9 05:23:28 2010	(r22370)
+++ trunk/libavformat/matroskaenc.c	Tue Mar  9 05:23:33 2010	(r22371)
@@ -866,6 +866,11 @@ static int mkv_write_packet(AVFormatCont
     int ret;
     int64_t ts = mkv->tracks[pkt->stream_index].write_dts ? pkt->dts : pkt->pts;
 
+    if (ts == AV_NOPTS_VALUE) {
+        av_log(s, AV_LOG_ERROR, "Can't write packet with unknown timestamp\n");
+        return AVERROR(EINVAL);
+    }
+
     if (url_is_streamed(s->pb)) {
         if (!mkv->dyn_bc)
             url_open_dyn_buf(&mkv->dyn_bc);



More information about the ffmpeg-cvslog mailing list