mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
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:
parent
3c683ead7b
commit
6e2a117eb2
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue