From 107c456c0d77491fea9cb9efeb8867fe58565e54 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Laignel?= Date: Tue, 20 Jun 2023 14:56:44 +0200 Subject: [PATCH] qtdemux: opus: set entry as sampled ... otherwise streams with constant size samples defined with a single `sample_size` for all samples in the `stsz` box fall in the category `chunks_are_samples` in `qtdemux_stbl_init`, overriding the actual sample count. `FOURCC_soun` would set this automatically for `compression_id == 0xfffe`, however `compression_id` is read from the Audio Sample Entry box at an offset marked as "pre-defined" in some version of the spec and set to 0 both by GStreamer and FFmpeg for opus streams. Considering the stream `sampled` flag is set explicitely by other fourcc variants, doing so for opus seems consistent. Part-of: --- subprojects/gst-plugins-good/gst/isomp4/qtdemux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c index 5137e1e..499826d 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c +++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c @@ -12978,6 +12978,9 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) channel_mapping_family, stream_count, coupled_count, channel_mapping); g_free (channel_mapping); + + entry->sampled = TRUE; + break; } default: -- 2.7.4