[xiph-commits] r14932 - trunk/ffmpeg2theora

j at svn.xiph.org j at svn.xiph.org
Tue May 20 04:37:06 PDT 2008


Author: j
Date: 2008-05-20 04:37:04 -0700 (Tue, 20 May 2008)
New Revision: 14932

Modified:
   trunk/ffmpeg2theora/
   trunk/ffmpeg2theora/ffmpeg2theora.c
Log:
handle broken srt files better


Property changes on: trunk/ffmpeg2theora
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2008-05-19 00:44:09.227999926 +0200
committer: j
properties: 
	branch-nick: ffmpeg2theora

   + timestamp: 2008-05-20 13:19:39.566999912 +0200
committer: j
properties: 
	branch-nick: ffmpeg2theora

Name: bzr:revision-id:v3-single1-dHJ1bmsvZmZtcGVnMnRoZW9yYQ..
   - 191 j-20080517230830-he5x8v2m8yrfiw35
192 j-20080518224037-pkmoctzf4qce7tog
193 j-20080518224409-6hbfp3k2ssn6egqa

   + 191 j-20080517230830-he5x8v2m8yrfiw35
192 j-20080518224037-pkmoctzf4qce7tog
193 j-20080518224409-6hbfp3k2ssn6egqa
194 j-20080520111939-dhi52qwbqe7a47cu


Modified: trunk/ffmpeg2theora/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/ffmpeg2theora.c	2008-05-19 22:37:55 UTC (rev 14931)
+++ trunk/ffmpeg2theora/ffmpeg2theora.c	2008-05-20 11:37:04 UTC (rev 14932)
@@ -308,9 +308,7 @@
             return -1;
           }
           if (id!=last_seen_id+1) {
-            fprintf(stderr,"WARNING - Error: non consecutive ids: %s\n",str);
-            fclose(f);
-            return -1;
+            fprintf(stderr,"WARNING - non consecutive ids: %s - pretending not to have noticed\n",str);
           }
           last_seen_id=id;
           need=need_timing;
@@ -1007,8 +1005,8 @@
         for (i=0; i<this->n_kate_streams; ++i) {
             ff2theora_kate_stream *ks = this->kate_streams+i;
             kate_info *ki = &info.kate_streams[i].ki;
+            kate_info_init(ki);
             if (ks->num_subtitles > 0) {
-                kate_info_init(ki);
                 kate_info_set_language(ki, ks->subtitles_language);
                 kate_info_set_category(ki, ks->subtitles_category[0]?ks->subtitles_category:"subtitles");
                 if(this->force_input_fps) {
@@ -1044,6 +1042,11 @@
                   ks->subtitles_count++;
               }
           }
+          else {
+            ks->filename=NULL;
+            ks->num_subtitles=0;
+            ks->subtitles=NULL;
+          }
         }
 
         if(info.audio_only && (this->end_time>0 || this->start_time>0)){



More information about the commits mailing list