Skip to content

Commit

Permalink
video_display/file: Fix crash on init
Browse files Browse the repository at this point in the history
VIDEO_CODEC_NONE would get passed through get_available_pix_fmts() to
get_pixfmt_desc() and fail on assert
  • Loading branch information
mpiatka committed Sep 25, 2024
1 parent 2052b5a commit b09d76b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video_display/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b09d76b

Please sign in to comment.