From: Edward Hervey Date: Fri, 29 Apr 2011 11:33:43 +0000 (+0200) Subject: mpegvideoparse: Avoid double scanning of pictures X-Git-Tag: 1.19.3~507^2~16050^2~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=813ac7bb2df7252767d27087c8fa6d17e168fdd9;p=platform%2Fupstream%2Fgstreamer.git mpegvideoparse: Avoid double scanning of pictures The incoming data has already been scanned in mpeg_packetizer_add_buf. We can therefore stop scanning for picture data as soon as we've parsed the header. Makes mpegvideoparse 2 times faster. https://bugzilla.gnome.org/show_bug.cgi?id=648933 --- diff --git a/gst/mpegvideoparse/mpegvideoparse.c b/gst/mpegvideoparse/mpegvideoparse.c index 92e38a1..2f4e96c 100644 --- a/gst/mpegvideoparse/mpegvideoparse.c +++ b/gst/mpegvideoparse/mpegvideoparse.c @@ -434,6 +434,7 @@ mpegvideoparse_handle_picture (MpegVideoParse * mpegvideoparse, GstBuffer * buf) picture_type_name (hdr.pic_type)); /* FIXME: Can use the picture type and number of fields to track a * timestamp */ + break; } cur = mpeg_util_find_start_code (&sync_word, cur, end); }