diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-16 21:47:39 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-16 21:47:39 +0100 |
commit | bc38bc27b7890170d36752a7aab27fbbc6817587 (patch) | |
tree | c1d0ac4e24aee1604e5a07f75183433fbc7f2e23 /gst/asfmux | |
parent | ed82d408b1a011e00e7bd6b2253d017d5a62ae26 (diff) | |
download | gstreamer-plugins-bad-bc38bc27b7890170d36752a7aab27fbbc6817587.tar.gz |
don't pass random pointers to pull_range
Diffstat (limited to 'gst/asfmux')
-rw-r--r-- | gst/asfmux/gstasfparse.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gst/asfmux/gstasfparse.c b/gst/asfmux/gstasfparse.c index ab1f69152..40231f6d8 100644 --- a/gst/asfmux/gstasfparse.c +++ b/gst/asfmux/gstasfparse.c @@ -226,12 +226,13 @@ gst_asf_parse_pull_packets (GstAsfParse * asfparse) GstFlowReturn ret; while (asfparse->asfinfo->broadcast || asfparse->parsed_packets < asfparse->asfinfo->packets_count) { - GstBuffer *packet = NULL; + GstBuffer *packet; GST_DEBUG_OBJECT (asfparse, "Parsing packet %" G_GUINT64_FORMAT, asfparse->parsed_packets); /* get the packet */ + packet = NULL; ret = gst_pad_pull_range (asfparse->sinkpad, asfparse->offset, asfparse->asfinfo->packet_size, &packet); if (ret != GST_FLOW_OK) @@ -250,11 +251,12 @@ gst_asf_parse_pull_packets (GstAsfParse * asfparse) static GstFlowReturn gst_asf_parse_pull_indexes (GstAsfParse * asfparse) { - GstBuffer *guid_and_size = NULL; - GstBuffer *buf = NULL; + GstBuffer *guid_and_size; + GstBuffer *buf; guint64 obj_size; GstFlowReturn ret = GST_FLOW_OK; while (1) { + guid_and_size = NULL; ret = gst_pad_pull_range (asfparse->sinkpad, asfparse->offset, ASF_GUID_OBJSIZE_SIZE, &guid_and_size); if (ret != GST_FLOW_OK) @@ -271,6 +273,7 @@ gst_asf_parse_pull_indexes (GstAsfParse * asfparse) asfparse->offset += ASF_GUID_OBJSIZE_SIZE; /* pull the rest of the object */ + buf = NULL; ret = gst_pad_pull_range (asfparse->sinkpad, asfparse->offset, obj_size, &buf); if (ret != GST_FLOW_OK) { |