pnmdec: completely reset parsing state at flush
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sat, 17 Oct 2015 03:45:42 +0000 (20:45 -0700)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 20 Oct 2015 07:12:32 +0000 (10:12 +0300)
Makes sure the mngr struct reflects a clean state
for the next frame, avoiding failures like:

https://bugzilla.gnome.org/show_bug.cgi?id=756563

gst/pnm/gstpnmdec.c

index 6963e5e..d99374a 100644 (file)
@@ -90,10 +90,7 @@ gst_pnmdec_class_init (GstPnmdecClass * klass)
 static void
 gst_pnmdec_flush (GstPnmdec * s)
 {
-  s->mngr.info.width = 0;
-  s->mngr.info.height = 0;
-  s->mngr.info.fields = 0;
-  s->mngr.info.max = 0;
+  memset (&s->mngr, 0, sizeof (s->mngr));
   s->size = 0;
   s->current_size = 0;
   if (s->buf) {