dashdemux: When clearing the sidx parser, reset all state
authorSebastian Dröge <sebastian@centricular.com>
Wed, 15 Mar 2017 11:21:38 +0000 (13:21 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 15 Mar 2017 11:27:23 +0000 (13:27 +0200)
And especially don't keep entry count and index around, we have no
entries anymore after clearing.

ext/dash/gstisoff.c

index af1f63a..f305b7c 100644 (file)
@@ -363,7 +363,9 @@ void
 gst_isoff_sidx_parser_clear (GstSidxParser * parser)
 {
   g_free (parser->sidx.entries);
-  parser->sidx.entries = NULL;
+  memset (parser, 0, sizeof (*parser));
+
+  gst_isoff_sidx_parser_init (parser);
 }
 
 static void