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

j at svn.xiph.org j at svn.xiph.org
Thu Apr 30 06:34:17 PDT 2009


Author: j
Date: 2009-04-30 06:34:16 -0700 (Thu, 30 Apr 2009)
New Revision: 15968

Modified:
   trunk/ffmpeg2theora/src/ffmpeg2theora.c
Log:
set eos if only cutting audio, also make cutting more accurate

Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c	2009-04-30 05:13:43 UTC (rev 15967)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c	2009-04-30 13:34:16 UTC (rev 15968)
@@ -1205,6 +1205,14 @@
                                 audio_p = audio_buf;
                         }
                     }
+                    if (this->sample_count + samples_out > no_samples) {
+                        e_o_s = 1;
+                        samples_out = no_samples - this->sample_count;
+                        if (samples_out <= 0) {
+                            break;
+                        }
+                    }
+
                     oggmux_add_audio(&info, audio_p,
                         samples_out *(this->channels),samples_out,e_o_s);
                     this->sample_count += samples_out;



More information about the commits mailing list