mpegvideoparse: Avoid double scanning of pictures
authorEdward Hervey <edward.hervey@collabora.co.uk>
Fri, 29 Apr 2011 11:33:43 +0000 (13:33 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Mon, 6 Jun 2011 10:44:58 +0000 (12:44 +0200)
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

index 92e38a1..2f4e96c 100644 (file)
@@ -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);
   }