[xiph-commits] r18078 - trunk/ffmpeg2theora/src

oggk at svn.xiph.org oggk at svn.xiph.org
Sun Sep 4 13:05:44 PDT 2011


Author: oggk
Date: 2011-09-04 13:05:44 -0700 (Sun, 04 Sep 2011)
New Revision: 18078

Modified:
   trunk/ffmpeg2theora/src/theorautils.c
Log:
Warn, instead of asserting, when a stream has nothing to index.
This can happen when encoding part of a video with subtitles,
if no subtitles are present in the encoded segment.



Modified: trunk/ffmpeg2theora/src/theorautils.c
===================================================================
--- trunk/ffmpeg2theora/src/theorautils.c	2011-09-02 02:49:00 UTC (rev 18077)
+++ trunk/ffmpeg2theora/src/theorautils.c	2011-09-04 20:05:44 UTC (rev 18078)
@@ -533,8 +533,12 @@
     int index_bytes = 0;  
     int keypoints_cutoff = 0;
 
-    /* Must have indexed keypoints. */
-    assert(index->max_keypoints > 0 && index->packet_num > 0);
+    /* Must have indexed keypoints to go on */
+    if (index->max_keypoints == 0 || index->packet_num == 0) {
+      fprintf(stderr, "WARNING: no key points for %s stream %08x\n", name, serialno);
+      return 0;
+    }
+
     /* Must have placeholder packet to rewrite. */
     assert(index->page_location > 0);
 



More information about the commits mailing list