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

Francois Cartegnie git at videolan.org
Wed Oct 21 22:37:08 CEST 2015


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct 21 22:31:10 2015 +0200| [d946714922e665f87d4495b08174103dc093a97b] | committer: Jean-Baptiste Kempf

demux: mp4: reset current position context after failed read

(cherry picked from commit 8e18ce4793067d2040aee50860ea6ee970301cb8)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 9ceb325..944d39b 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -5150,6 +5150,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;
 
@@ -5374,6 +5375,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