asfdemux: Do not try to free const pointer

In gst_asf_demux_chain_headers, when 'goto wrong_type' was called
asfdemux tried to free a const pointer that had been cast to a
normal pointer variable.
This commit is contained in:
Thiago Santos 2009-06-26 20:52:29 -03:00
parent 3c683ead7b
commit 6e2a117eb2

View file

@ -744,13 +744,14 @@ gst_asf_demux_chain_headers (GstASFDemux * demux)
GstFlowReturn flow;
AsfObject obj;
guint8 *header_data, *data = NULL;
const guint8 *cdata = NULL;
guint64 header_size;
data = (guint8 *) gst_adapter_peek (demux->adapter, ASF_OBJECT_HEADER_SIZE);
if (data == NULL)
cdata = (guint8 *) gst_adapter_peek (demux->adapter, ASF_OBJECT_HEADER_SIZE);
if (cdata == NULL)
goto need_more_data;
asf_demux_peek_object (demux, data, ASF_OBJECT_HEADER_SIZE, &obj);
asf_demux_peek_object (demux, cdata, ASF_OBJECT_HEADER_SIZE, &obj);
if (obj.id != ASF_OBJ_HEADER)
goto wrong_type;