diff options
author | Vivia Nikolaidou <vivia@ahiru.eu> | 2020-06-12 13:21:02 +0300 |
---|---|---|
committer | Vivia Nikolaidou <vivia@ahiru.eu> | 2020-06-12 13:21:02 +0300 |
commit | ef78014d15bf3e0f39a9572b57caae5dcc21f133 (patch) | |
tree | b94f48aeac2d1201cfa4471867d050871bfe74bc | |
parent | 6fba2e3dd35a24bc881cc8b8ea35da186f290f34 (diff) |
deinterlace: Fix invalid read in yadif
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/621>
-rw-r--r-- | gst/deinterlace/yadif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/deinterlace/yadif.c b/gst/deinterlace/yadif.c index 160e9ac094..8f6143bc57 100644 --- a/gst/deinterlace/yadif.c +++ b/gst/deinterlace/yadif.c @@ -223,7 +223,7 @@ filter_edges (guint8 * dst, const int colors, int y_alternates_every) { int x; - const int edge = colors * (MAX_ALIGN / bpp - 1); + const int edge = colors * (MAX_ALIGN / bpp); const int border = 3 * colors; /* Only edge pixels need to be processed here. A constant value of false @@ -283,7 +283,7 @@ filter_scanline_yadif (GstDeinterlaceSimpleMethod * self, guint8 *dst = out; const int bpp = 1; // Hard code 8-bit atm int w = size / bpp; - int edge = colors * MAX_ALIGN / bpp - 1; + int edge = colors * MAX_ALIGN / bpp; GstDeinterlaceScanlineData s = *s_orig; int mode = (s.tt1 == NULL || s.bb1 == NULL || s.ttp == NULL |