vdpau: Fix loop to not read before the valid memory area

This commit is contained in:
Sebastian Dröge 2012-03-06 14:50:06 +01:00
parent e34a70902c
commit be82ae207a

View file

@ -716,7 +716,7 @@ gst_vdp_h264_dec_parse_data (GstBaseVideoDecoder * base_video_decoder,
size = gst_bit_reader_get_remaining (&reader) / 8;
i = size - 1;
while (size >= 0 && data[i] == 0x00) {
while (size > 0 && data[i] == 0x00) {
size--;
i--;
}
@ -870,8 +870,7 @@ gst_vdp_h264_dec_base_init (gpointer g_class)
"Decode h264 stream with vdpau",
"Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>");
gst_element_class_add_static_pad_template (element_class,
&sink_template);
gst_element_class_add_static_pad_template (element_class, &sink_template);
}
static void