engine: avi: do not playback video if codec context is NULL

This commit is contained in:
Alibek Omarov
2026-02-05 08:26:43 +05:00
parent fa34092ba2
commit 0e75428d62

View File

@@ -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 );