From b09d76bcd3c5779900902e5382849cbc72939d3b Mon Sep 17 00:00:00 2001 From: Martin Piatka Date: Wed, 25 Sep 2024 15:03:40 +0200 Subject: [PATCH] video_display/file: Fix crash on init VIDEO_CODEC_NONE would get passed through get_available_pix_fmts() to get_pixfmt_desc() and fail on assert --- src/video_display/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_display/file.c b/src/video_display/file.c index 5027a04df..b37535651 100644 --- a/src/video_display/file.c +++ b/src/video_display/file.c @@ -346,7 +346,7 @@ display_file_get_property(void *state, int property, void *val, size_t *len) codecs[count++] = R12L; codecs[count++] = v210; } - for (int i = 0; i < VIDEO_CODEC_COUNT; ++i) { + for (int i = VIDEO_CODEC_FIRST; i < VIDEO_CODEC_COUNT; ++i) { if (s->is_nut) { if (get_ug_to_av_pixfmt(i) != AV_PIX_FMT_NONE) { codecs[count++] = i;