Fix segfault with videos with unusual resolution, patch by Stanislav Maslovski %...
authorgpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>
Wed, 15 Nov 2006 21:52:34 +0000 (21:52 +0000)
committergpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>
Wed, 15 Nov 2006 21:52:34 +0000 (21:52 +0000)
Original thread:
date: Nov 15, 2006 10:38 PM
subject: [MPlayer-dev-eng] [PATCH] vf_screenshot.c: segfault (buffer overflow)

git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@20946 b3059339-0415-0410-9bf9-f77b7e298cf2

libmpcodecs/vf_screenshot.c

index c3a9453..fc1b0f6 100644 (file)
@@ -139,7 +139,7 @@ static void scale_image(struct vf_priv_s* priv, mp_image_t *mpi)
 
     dst[0] = priv->buffer;
     dst[1] = dst[2] = 0;
-    sws_scale_ordered(priv->ctx, mpi->planes, mpi->stride, 0, mpi->height, dst, dst_stride);
+    sws_scale_ordered(priv->ctx, mpi->planes, mpi->stride, 0, priv->dh, dst, dst_stride);
 }
 
 static void start_slice(struct vf_instance_s* vf, mp_image_t *mpi){