asfdemux: avoid unnecessary stream lookup
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 12 Apr 2012 13:45:51 +0000 (14:45 +0100)
committerNikhil Devshatwar <a0132237@ti.com>
Fri, 17 May 2013 09:40:56 +0000 (15:10 +0530)
We have already retrieved the stream for that stream number and
made sure it's not NULL, so no need to do it again here; neither
the number nor the streams changed since the last time.

gst/asfdemux/asfpacket.c

index 552a559dc35c8717b84383dc2912790c95698ef7..fb95770141a9b34e2e6b271cb0b30f49e0fcf485 100644 (file)
@@ -381,8 +381,7 @@ gst_asf_demux_parse_payload (GstASFDemux * demux, AsfPacket * packet,
 
     GST_LOG_OBJECT (demux, "payload length: %u", payload_len);
 
-    if ((stream = gst_asf_demux_get_stream (demux, stream_num))
-        && payload_len) {
+    if (payload_len > 0) {
       payload.buf = asf_packet_create_payload_buffer (packet, p_data, p_size,
           payload_len);