mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
matroskademux: Return FALSE from TOC query if no TOC exists instead of an empty TOC
This commit is contained in:
parent
296783908c
commit
c3061f434b
1 changed files with 6 additions and 7 deletions
|
@ -1433,17 +1433,16 @@ gst_matroska_demux_query (GstMatroskaDemux * demux, GstPad * pad,
|
||||||
|
|
||||||
case GST_QUERY_TOC:
|
case GST_QUERY_TOC:
|
||||||
{
|
{
|
||||||
GstToc *toc;
|
GstToc *toc = NULL;
|
||||||
|
|
||||||
GST_OBJECT_LOCK (demux);
|
GST_OBJECT_LOCK (demux);
|
||||||
if (demux->common.toc)
|
if (demux->common.toc) {
|
||||||
toc = demux->common.toc;
|
toc = demux->common.toc;
|
||||||
else
|
res = TRUE;
|
||||||
toc = gst_toc_new ();
|
} else {
|
||||||
|
res = FALSE;
|
||||||
|
}
|
||||||
gst_query_set_toc (query, toc, 0);
|
gst_query_set_toc (query, toc, 0);
|
||||||
res = TRUE;
|
|
||||||
if (!demux->common.toc)
|
|
||||||
gst_toc_unref (toc);
|
|
||||||
GST_OBJECT_UNLOCK (demux);
|
GST_OBJECT_UNLOCK (demux);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue