mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
encode: don't segfault when bailing out due to resolution change
Somehow this code expects lastimg is always set.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user