From 0e75428d62d1f9d2f5ec3cdaa7e8da13a72ca25e Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 5 Feb 2026 08:26:43 +0500 Subject: [PATCH] engine: avi: do not playback video if codec context is NULL --- engine/client/avi/avi_ffmpeg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/client/avi/avi_ffmpeg.c b/engine/client/avi/avi_ffmpeg.c index 07c9f321..82e46508 100644 --- a/engine/client/avi/avi_ffmpeg.c +++ b/engine/client/avi/avi_ffmpeg.c @@ -355,6 +355,10 @@ qboolean AVI_Think( movie_state_t *Avi ) qboolean decoded = false; qboolean flushing = false; qboolean redraw = false; + + if( !Avi->video_ctx ) + return false; + const double timebase = (double)Avi->video_ctx->pkt_timebase.den / Avi->video_ctx->pkt_timebase.num; int64_t curtime = round( Platform_DoubleTime() * timebase );