summaryrefslogtreecommitdiff
path: root/sys/vdpau
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-03-06 14:50:06 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-03-06 14:50:06 +0100
commitbe82ae207a30dd16a932adb508ba616170b5be49 (patch)
treedae95a8469e80793ad2d54be25d0286ff9ba5943 /sys/vdpau
parente34a70902c9e129bbe485974c4b82fde5107f5d4 (diff)
vdpau: Fix loop to not read before the valid memory area
Diffstat (limited to 'sys/vdpau')
-rw-r--r--sys/vdpau/h264/gstvdph264dec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/vdpau/h264/gstvdph264dec.c b/sys/vdpau/h264/gstvdph264dec.c
index 6b6c3360a..d7af47b6f 100644
--- a/sys/vdpau/h264/gstvdph264dec.c
+++ b/sys/vdpau/h264/gstvdph264dec.c
@@ -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