[vlc-commits] demux: mp4: reset current position context after failed read

Francois Cartegnie git at videolan.org
Wed Oct 21 22:34:58 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct 21 22:31:10 2015 +0200| [8e18ce4793067d2040aee50860ea6ee970301cb8] | committer: Francois Cartegnie

demux: mp4: reset current position context after failed read

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8e18ce4793067d2040aee50860ea6ee970301cb8
---

 modules/demux/mp4/mp4.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 74ac7ce..4bb5349 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -4818,6 +4818,7 @@ error:
         msg_Err( p_demux, "mdat had still %"PRIu32" bytes unparsed as samples",
                  p_sys->context.i_mdatbytesleft );
         stream_ReadU32( p_demux->s, NULL, p_sys->context.i_mdatbytesleft );
+        p_sys->context.i_mdatbytesleft = 0;
     }
     p_sys->context.i_current_box_type = 0;
 
@@ -5052,6 +5053,7 @@ end:
     {
         msg_Warn( p_demux, "mdat had still %"PRIu32" bytes unparsed as samples", p_sys->context.i_mdatbytesleft - 8 );
         stream_ReadU32( p_demux->s, NULL, p_sys->context.i_mdatbytesleft );
+        p_sys->context.i_mdatbytesleft = 0;
     }
 
     p_sys->context.i_current_box_type = 0;



More information about the vlc-commits mailing list