mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
vdpau: Fix loop to not read before the valid memory area
This commit is contained in:
parent
e34a70902c
commit
be82ae207a
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue