]> git.sesse.net Git - vlc/commitdiff
mp4: calculate stream duration sameway all around
authorIlkka Ollakka <ileoo@videolan.org>
Sun, 13 Jun 2010 20:20:28 +0000 (23:20 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 13 Jun 2010 20:35:29 +0000 (23:35 +0300)
modules/mux/mp4.c

index 8fde903da377ba0767defd67e7a1b2f1661ee4ec..8af05589ec941cae2c4fd24bee7d339b1cb55896 100644 (file)
@@ -564,7 +564,7 @@ again:
         }
 
         /* update */
-        p_stream->i_duration += p_data->i_length;
+        p_stream->i_duration = p_stream->i_last_dts - p_stream->i_dts_start + p_data->i_length;
         p_sys->i_pos += p_data->i_buffer;
 
         /* Save the DTS */