diff options
author | wm4 <wm4@nowhere> | 2014-11-11 17:59:03 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-11 17:59:49 +0100 |
commit | 67e0230905ff6f725806d2aa907dad8f7e1f4c7a (patch) | |
tree | dc5124719d7cd70ac233115f935b9be76cd1a7ee | |
parent | d8cd768ed078e875a05b08251ec94fdb7ee03d08 (diff) | |
download | mpv-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.
-rw-r--r-- | video/out/vo_lavc.c | 2 |
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; |