audioencoder: prevent crashing when comparing to a freshly inited GstAudioInfo

This commit is contained in:
Mark Nauwelaerts 2011-09-22 15:37:07 +02:00
parent 7fa7de9221
commit b420dd54ea

View 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))