]> git.sesse.net Git - x264/blobdiff - filters/video/crop.c
Fix possible crashes in resize and crop filters with high bitdepth input
[x264] / filters / video / crop.c
index a58813b77d3789c44aea1c7c7bd0f5fad4140f9c..98faab741f22ee392a106ec411043ce270b2af0f 100644 (file)
@@ -105,8 +105,7 @@ static int get_frame( hnd_t handle, cli_pic_t *output, int frame )
     for( int i = 0; i < output->img.planes; i++ )
     {
         intptr_t offset = output->img.stride[i] * h->dims[1] * h->csp->height[i];
-        offset += h->dims[0] * h->csp->width[i];
-        offset *= x264_cli_csp_depth_factor( output->img.csp );
+        offset += h->dims[0] * h->csp->width[i] * x264_cli_csp_depth_factor( output->img.csp );
         output->img.plane[i] += offset;
     }
     return 0;