aiffparse: don't unref NULL buffer

This commit is contained in:
Tim-Philipp Müller 2013-08-10 19:43:41 +01:00
parent 8c4241e546
commit 48734bd522

View file

@ -575,8 +575,7 @@ gst_aiff_parse_calculate_duration (GstAiffParse * aiff)
} }
static void static void
gst_aiff_parse_ignore_chunk (GstAiffParse * aiff, GstBuffer * buf, guint32 tag, gst_aiff_parse_ignore_chunk (GstAiffParse * aiff, guint32 tag, guint32 size)
guint32 size)
{ {
guint flush; guint flush;
@ -590,8 +589,6 @@ gst_aiff_parse_ignore_chunk (GstAiffParse * aiff, GstBuffer * buf, guint32 tag,
aiff->offset += flush; aiff->offset += flush;
if (aiff->streaming) { if (aiff->streaming) {
gst_adapter_flush (aiff->adapter, flush); gst_adapter_flush (aiff->adapter, flush);
} else {
gst_buffer_unref (buf);
} }
} }
@ -981,7 +978,7 @@ gst_aiff_parse_stream_headers (GstAiffParse * aiff)
break; break;
} }
default: default:
gst_aiff_parse_ignore_chunk (aiff, buf, tag, size); gst_aiff_parse_ignore_chunk (aiff, tag, size);
} }
buf = NULL; buf = NULL;