mpegtsmux: Use 'internal' stream_type to detect codec changes

The TsMuxStream internal_stream_type field stores the original
'full' stream type (such as Opus), while the stream_type field
stores the value that will actually be written into the MPEG-TS
packets according to the codec mappings. When checking if
input caps are changing stream type, check the original type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9430>
This commit is contained in:
Jan Schmidt 2025-08-07 14:31:38 +10:00 committed by GStreamer Marge Bot
parent 1cba38145f
commit 80949e1ca6

View File

@ -972,10 +972,10 @@ gst_base_ts_mux_create_or_update_stream (GstBaseTsMux * mux,
goto error;
}
if (ts_pad->stream && st != ts_pad->stream->stream_type) {
if (ts_pad->stream && st != ts_pad->stream->internal_stream_type) {
GST_ELEMENT_ERROR (mux, STREAM, MUX,
("Stream type change from %02x to %02x not supported",
ts_pad->stream->stream_type, st), NULL);
ts_pad->stream->internal_stream_type, st), NULL);
goto error;
}