[vlc-devel] [PATCH] mp4: assume that blocks have correct i_length by now

Ilkka Ollakka ileoo at videolan.org
Mon Feb 17 19:53:30 CET 2014


---
 modules/mux/mp4.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c
index 51e2b3c..38c0299 100644
--- a/modules/mux/mp4.c
+++ b/modules/mux/mp4.c
@@ -438,7 +438,7 @@ static int Mux(sout_mux_t *p_mux)
     sout_mux_sys_t *p_sys = p_mux->p_sys;
 
     for (;;) {
-        int i_stream = sout_MuxGetStream(p_mux, 2, NULL);
+        int i_stream = sout_MuxGetStream(p_mux, 1, NULL);
         if (i_stream < 0)
             return(VLC_SUCCESS);
 
@@ -455,14 +455,6 @@ static int Mux(sout_mux_t *p_mux)
         } while (!p_data);
 
         if (p_stream->fmt.i_cat != SPU_ES) {
-            /* Fix length of the sample */
-            if (block_FifoCount(p_input->p_fifo) > 0) {
-                block_t *p_next = block_FifoShow(p_input->p_fifo);
-                int64_t i_diff  = p_next->i_dts - p_data->i_dts;
-
-                if (i_diff < CLOCK_FREQ) /* protection */
-                    p_data->i_length = i_diff;
-            }
             if (p_data->i_length <= 0) {
                 msg_Warn(p_mux, "i_length <= 0");
                 p_stream->i_length_neg += p_data->i_length - 1;
-- 
1.8.4.5




More information about the vlc-devel mailing list