From 0980dfcb99ae0c20cd4997acb50868bf5377c232 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 5 Nov 2014 11:51:44 +0100 Subject: [PATCH] video-converter: pass output line correctly --- gst-libs/gst/video/video-converter.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c index ab3edfc..80d33cd 100644 --- a/gst-libs/gst/video/video-converter.c +++ b/gst-libs/gst/video/video-converter.c @@ -219,6 +219,8 @@ gst_line_cache_get_lines (GstLineCache * cache, gint out_line, gint in_line, } while (TRUE) { + gint oline; + if (cache->first <= in_line && in_line + n_lines <= cache->first + (gint) cache->lines->len) { return cache->lines->pdata + (in_line - cache->first); @@ -227,7 +229,9 @@ gst_line_cache_get_lines (GstLineCache * cache, gint out_line, gint in_line, if (cache->need_line == NULL) break; - if (!cache->need_line (cache, out_line, cache->first + cache->lines->len, + oline = out_line + cache->first + cache->lines->len - in_line; + + if (!cache->need_line (cache, oline, cache->first + cache->lines->len, cache->need_line_data)) break; } -- 2.7.4