From ef79fcbbd27d9f6e8096c278d2975c7c71bc67b9 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 1 Dec 2023 21:13:01 +0100 Subject: [PATCH] Fix AV1 demuxing For AV1, the config packet must not be merged with the next non-config packet. This fixes the following error when passing --video-codec=av1: > INFO: [FFmpeg] libdav1d 1.3.0 > ERROR: [FFmpeg] Unknown OBU type 0 of size 29393 > ERROR: [FFmpeg] Error parsing OBU data > ERROR: Decoder 'video': could not send video packet: -1094995529 PR #4487 --- app/src/demuxer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/demuxer.c b/app/src/demuxer.c index c9ee8f3c45..c27ea29238 100644 --- a/app/src/demuxer.c +++ b/app/src/demuxer.c @@ -227,8 +227,9 @@ run_demuxer(void *data) { } // Config packets must be merged with the next non-config packet only for - // video streams - bool must_merge_config_packet = codec->type == AVMEDIA_TYPE_VIDEO; + // H.26x + bool must_merge_config_packet = raw_codec_id == SC_CODEC_ID_H264 + || raw_codec_id == SC_CODEC_ID_H265; struct sc_packet_merger merger;