theoradec: fix buffer overrun on 422 decode.
This commit is contained in:
parent
c94a36bff4
commit
21c52af2b3
@ -1219,7 +1219,7 @@ theora_handle_422_image (GstTheoraDec * dec, yuv_buffer * yuv, GstBuffer ** out)
|
|||||||
|
|
||||||
curdest = dest + 1;
|
curdest = dest + 1;
|
||||||
src = src_cb;
|
src = src_cb;
|
||||||
for (j = 0; j < width; j++) {
|
for (j = 0; j < width / 2; j++) {
|
||||||
*curdest = *src++;
|
*curdest = *src++;
|
||||||
curdest += 4;
|
curdest += 4;
|
||||||
}
|
}
|
||||||
@ -1227,7 +1227,7 @@ theora_handle_422_image (GstTheoraDec * dec, yuv_buffer * yuv, GstBuffer ** out)
|
|||||||
|
|
||||||
curdest = dest + 3;
|
curdest = dest + 3;
|
||||||
src = src_cr;
|
src = src_cr;
|
||||||
for (j = 0; j < width; j++) {
|
for (j = 0; j < width / 2; j++) {
|
||||||
*curdest = *src++;
|
*curdest = *src++;
|
||||||
curdest += 4;
|
curdest += 4;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user