gst/audioresample/gstaudioresample.c: Guard against a NULL dereference I somehow...
authorJan Schmidt <thaytan@mad.scientist.com>
Fri, 14 Nov 2008 21:44:32 +0000 (21:44 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Fri, 14 Nov 2008 21:44:32 +0000 (21:44 +0000)
Original commit message from CVS:
* gst/audioresample/gstaudioresample.c:
Guard against a NULL dereference I somehow encountered -
with a FLUSH_STOP arriving either before basetransform _start(),
or after _stop().
* gst/typefind/gsttypefindfunctions.c:
Make sure we never jump backwards when typefinding corrupt mov files.

gst/audioresample/gstaudioresample.c

index 5276220..1826849 100644 (file)
@@ -484,7 +484,8 @@ audioresample_event (GstBaseTransform * base, GstEvent * event)
     case GST_EVENT_FLUSH_START:
       break;
     case GST_EVENT_FLUSH_STOP:
-      resample_input_flush (audioresample->resample);
+      if (audioresample->resample)
+        resample_input_flush (audioresample->resample);
       audioresample->ts_offset = -1;
       audioresample->next_ts = -1;
       audioresample->offset = -1;