audioencoder: prevent crashing when comparing to a freshly inited GstAudioInfo
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 22 Sep 2011 13:37:07 +0000 (15:37 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 22 Sep 2011 13:46:56 +0000 (15:46 +0200)
gst-libs/gst/audio/gstaudioencoder.c

index 619ec5a..80f5cd0 100644 (file)
@@ -933,6 +933,8 @@ audio_info_is_equal (GstAudioInfo * from, GstAudioInfo * to)
 {
   if (from == to)
     return TRUE;
+  if (from->finfo == NULL || to->finfo == NULL)
+    return FALSE;
   if (GST_AUDIO_INFO_FORMAT (from) != GST_AUDIO_INFO_FORMAT (to))
     return FALSE;
   if (GST_AUDIO_INFO_RATE (from) != GST_AUDIO_INFO_RATE (to))