[vlc-commits] vdummy: don't crash when used with hardware decoding
Steve Lhomme
git at videolan.org
Tue Oct 17 18:28:13 CEST 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Oct 17 15:52:20 2017 +0200| [037728322c1145ff077f6bf94806cb8dd33bee58] | committer: Jean-Baptiste Kempf
vdummy: don't crash when used with hardware decoding
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=037728322c1145ff077f6bf94806cb8dd33bee58
---
modules/video_output/vdummy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/vdummy.c b/modules/video_output/vdummy.c
index 40d54b9b96..f8535ca536 100644
--- a/modules/video_output/vdummy.c
+++ b/modules/video_output/vdummy.c
@@ -147,7 +147,8 @@ static void DisplayStat(vout_display_t *vd, picture_t *picture, subpicture_t *su
{
VLC_UNUSED(vd);
VLC_UNUSED(subpicture);
- if (vd->fmt.i_width*vd->fmt.i_height >= sizeof(mtime_t)) {
+ if ( vd->fmt.i_width*vd->fmt.i_height >= sizeof(mtime_t) &&
+ (picture->p->i_pitch * picture->p->i_lines) >= sizeof(mtime_t) ) {
mtime_t date;
memcpy(&date, picture->p->p_pixels, sizeof(date));
msg_Dbg(vd, "VOUT got %"PRIu64" ms offset",
More information about the vlc-commits
mailing list