From: Mark Nauwelaerts Date: Thu, 22 Sep 2011 13:37:07 +0000 (+0200) Subject: audioencoder: prevent crashing when comparing to a freshly inited GstAudioInfo X-Git-Tag: 1.19.3~511^2~6555^2~461 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b420dd54eab6ebb077630e830267f25c2d7d59f5;p=platform%2Fupstream%2Fgstreamer.git audioencoder: prevent crashing when comparing to a freshly inited GstAudioInfo --- diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 619ec5a..80f5cd0 100644 --- a/gst-libs/gst/audio/gstaudioencoder.c +++ b/gst-libs/gst/audio/gstaudioencoder.c @@ -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))