summaryrefslogtreecommitdiffstats
path: root/video/out/vo_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-11 17:59:03 +0100
committerwm4 <wm4@nowhere>2014-11-11 17:59:49 +0100
commit67e0230905ff6f725806d2aa907dad8f7e1f4c7a (patch)
treedc5124719d7cd70ac233115f935b9be76cd1a7ee /video/out/vo_lavc.c
parentd8cd768ed078e875a05b08251ec94fdb7ee03d08 (diff)
downloadmpv-67e0230905ff6f725806d2aa907dad8f7e1f4c7a.tar.bz2
mpv-67e0230905ff6f725806d2aa907dad8f7e1f4c7a.tar.xz
encode: don't segfault when bailing out due to resolution change
Somehow this code expects lastimg is always set.
Diffstat (limited to 'video/out/vo_lavc.c')
-rw-r--r--video/out/vo_lavc.c2
1 files changed, 1 insertions, 1 deletions
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;