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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4036>
This commit is contained in:
Shengqi Yu 2023-02-22 17:18:11 +08:00 committed by GStreamer Marge Bot
parent 28e2eccf55
commit 83576690b6
2 changed files with 4 additions and 10 deletions

View file

@ -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;

View file

@ -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;