From 83576690b60c802b5392e02f34d66d2e0315b7ec Mon Sep 17 00:00:00 2001 From: Shengqi Yu Date: Wed, 22 Feb 2023 17:18:11 +0800 Subject: [PATCH] matroskademux: Consider TrackUID==0 a warning and not handle it as error some special files whose trackUID is 0 can be played on the other player. But it cannot be played in GStreamer, because trackUID 0 will be treated as an error in matroskademux. So, it makes sense to only consider trackUID==0 a warning and not handle it as error https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1821 Part-of: --- subprojects/gst-plugins-good/gst/matroska/matroska-demux.c | 7 ++----- subprojects/gst-plugins-good/gst/matroska/matroska-parse.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/matroska/matroska-demux.c b/subprojects/gst-plugins-good/gst/matroska/matroska-demux.c index 1e771b04d0..6048509eb1 100644 --- a/subprojects/gst-plugins-good/gst/matroska/matroska-demux.c +++ b/subprojects/gst-plugins-good/gst/matroska/matroska-demux.c @@ -771,11 +771,8 @@ gst_matroska_demux_parse_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml, if ((ret = gst_ebml_read_uint (ebml, &id, &num)) != GST_FLOW_OK) break; - if (num == 0) { - GST_ERROR_OBJECT (demux, "Invalid TrackUID 0"); - ret = GST_FLOW_ERROR; - break; - } + if (num == 0) + GST_WARNING_OBJECT (demux, "Invalid TrackUID 0"); GST_DEBUG_OBJECT (demux, "TrackUID: %" G_GUINT64_FORMAT, num); context->uid = num; diff --git a/subprojects/gst-plugins-good/gst/matroska/matroska-parse.c b/subprojects/gst-plugins-good/gst/matroska/matroska-parse.c index 3fcb5c55e8..06805d1708 100644 --- a/subprojects/gst-plugins-good/gst/matroska/matroska-parse.c +++ b/subprojects/gst-plugins-good/gst/matroska/matroska-parse.c @@ -346,11 +346,8 @@ gst_matroska_parse_add_stream (GstMatroskaParse * parse, GstEbmlRead * ebml) if ((ret = gst_ebml_read_uint (ebml, &id, &num)) != GST_FLOW_OK) break; - if (num == 0) { - GST_ERROR_OBJECT (parse, "Invalid TrackUID 0"); - ret = GST_FLOW_ERROR; - break; - } + if (num == 0) + GST_WARNING_OBJECT (parse, "Invalid TrackUID 0"); GST_DEBUG_OBJECT (parse, "TrackUID: %" G_GUINT64_FORMAT, num); context->uid = num;