From 67e0230905ff6f725806d2aa907dad8f7e1f4c7a Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 11 Nov 2014 17:59:03 +0100 Subject: encode: don't segfault when bailing out due to resolution change Somehow this code expects lastimg is always set. --- video/out/vo_lavc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c index 706fb53ef7..d5cf263ce2 100644 --- a/video/out/vo_lavc.c +++ b/video/out/vo_lavc.c @@ -408,7 +408,7 @@ static void draw_image_unlocked(struct vo *vo, mp_image_t *mpi) if (vc->lastipts != AV_NOPTS_VALUE) { // we have a valid image in lastimg - while (vc->lastipts < frameipts) { + while (vc->lastimg && vc->lastipts < frameipts) { int64_t thisduration = vc->harddup ? 1 : (frameipts - vc->lastipts); AVPacket packet; -- cgit v1.2.3