From 813ac7bb2df7252767d27087c8fa6d17e168fdd9 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 29 Apr 2011 13:33:43 +0200 Subject: [PATCH] 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 --- gst/mpegvideoparse/mpegvideoparse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/mpegvideoparse/mpegvideoparse.c b/gst/mpegvideoparse/mpegvideoparse.c index 92e38a1527..2f4e96cecf 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); }