summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivia Nikolaidou <vivia@ahiru.eu>2021-02-19 16:44:35 +0200
committerTim-Philipp Müller <tim@centricular.com>2021-02-26 14:52:19 +0000
commit6b860202be626c22b54120f396872f074c3f25cc (patch)
tree14d143a04e1aa37b735a9f178f1046c5f957c67a
parentacc67a7ebd1ea8d8a842e9ddbffc8404b58ff02d (diff)
downloadgstreamer-plugins-base-6b860202be626c22b54120f396872f074c3f25cc.tar.gz
video-converter: Don't upsample/downsample/dither invalid lines
This is a fallout from the conversion to support multiple threads. convert->upsample_p is never NULL now, it's always an allocated array of n_threads potentially-null pointers. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1054>
-rw-r--r--gst-libs/gst/video/video-converter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c
index 73f37b404..985088cd4 100644
--- a/gst-libs/gst/video/video-converter.c
+++ b/gst-libs/gst/video/video-converter.c
@@ -2906,7 +2906,7 @@ do_upsample_lines (GstLineCache * cache, gint idx, gint out_line, gint in_line,
gst_line_cache_get_lines (cache->prev, idx, out_line, start_line,
n_lines);
- if (convert->upsample) {
+ if (convert->upsample[idx]) {
GST_DEBUG ("doing upsample %d-%d %p", start_line, start_line + n_lines - 1,
lines[0]);
gst_video_chroma_resample (convert->upsample[idx], lines,
@@ -3107,7 +3107,7 @@ do_downsample_lines (GstLineCache * cache, gint idx, gint out_line,
gst_line_cache_get_lines (cache->prev, idx, out_line, start_line,
n_lines);
- if (convert->downsample) {
+ if (convert->downsample[idx]) {
GST_DEBUG ("downsample line %d %d-%d %p", in_line, start_line,
start_line + n_lines - 1, lines[0]);
gst_video_chroma_resample (convert->downsample[idx], lines,
@@ -3130,7 +3130,7 @@ do_dither_lines (GstLineCache * cache, gint idx, gint out_line, gint in_line,
lines = gst_line_cache_get_lines (cache->prev, idx, out_line, in_line, 1);
destline = lines[0];
- if (convert->dither) {
+ if (convert->dither[idx]) {
GST_DEBUG ("Dither line %d %p", in_line, destline);
gst_video_dither_line (convert->dither[idx], destline, 0, out_line,
convert->out_width);