[vlc-commits] blend: silence warnings
Lyndon Brown
git at videolan.org
Wed Mar 20 15:34:35 CET 2019
vlc | branch: master | Lyndon Brown <jnqnfe at gmail.com> | Mon Mar 18 07:47:40 2019 +0000| [39e9a4f0b86b72af70de7ac79d17bb6b67bd305f] | committer: Thomas Guillem
blend: silence warnings
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=39e9a4f0b86b72af70de7ac79d17bb6b67bd305f
---
modules/video_filter/blend.cpp | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/video_filter/blend.cpp b/modules/video_filter/blend.cpp
index 0bba7e8871..b33aa084f3 100644
--- a/modules/video_filter/blend.cpp
+++ b/modules/video_filter/blend.cpp
@@ -146,8 +146,8 @@ private:
{
if (plane == 1 || plane == 2)
return (pixel*)&data[plane][(x + dx) / rx * sizeof(pixel)];
- else
- return (pixel*)&data[plane][(x + dx) / 1 * sizeof(pixel)];
+
+ return (pixel*)&data[plane][(x + dx) / 1 * sizeof(pixel)];
}
uint8_t *data[4];
};
@@ -280,7 +280,12 @@ public:
}
offset_a = 3;
} else {
- GetPackedRgbIndexes(fmt, &offset_r, &offset_g, &offset_b);
+ if (GetPackedRgbIndexes(fmt, &offset_r, &offset_g, &offset_b) != VLC_SUCCESS) {
+ /* at least init to something on error to silence compiler warnings */
+ offset_r = 0;
+ offset_g = 1;
+ offset_b = 2;
+ }
}
data = CPicture::getLine<1>(0);
}
More information about the vlc-commits
mailing list