snapshot: fix snapshots cropping
commit7a46fc430b090fc6b2b32216d0d5527fcf7be68b
authorRomain Vimont <rom@rom1v.com>
Mon, 6 Nov 2017 10:06:20 +0000 (6 11:06 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 6 Nov 2017 15:30:55 +0000 (6 16:30 +0100)
treeb32a008266b541c9b760af292df8b85d95843b86
parent042733829c14f8b2b1e734cc90856de92826a87b
snapshot: fix snapshots cropping

The snapshot picture was created using picture_Copy(), which does not
handle offsets. As a consequence, snapshots of cropped videos were
broken.

Use picture_Clone() (shallow copy) instead, then copy the crop settings
from the format.

Fixes #18970

Signed-off-by: Romain Vimont <rom@rom1v.com>
Acked-by: Thomas Guillem <thomas@gllm.fr>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/misc/image.c
src/video_output/snapshot.c
src/video_output/snapshot.h