nuvdemux: check directly for valid buffer

... rather than doing so indirectly in (incomplete) semantic way.
This commit is contained in:
Mark Nauwelaerts 2012-01-23 13:55:33 +01:00
parent b5c5fb58a3
commit ae02c7820b

View file

@ -488,7 +488,7 @@ gst_nuv_demux_stream_data (GstNuvDemux * nuv)
switch (h->i_type) {
case 'V':
{
if (h->i_length == 0)
if (!buf)
break;
GST_BUFFER_OFFSET (buf) = nuv->video_offset;
@ -499,7 +499,7 @@ gst_nuv_demux_stream_data (GstNuvDemux * nuv)
}
case 'A':
{
if (h->i_length == 0)
if (!buf)
break;
GST_BUFFER_OFFSET (buf) = nuv->audio_offset;