mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 07:22:44 +02:00
gstreamer playback: fix possible race condition
Origin commit data
------------------
Branch: master
Commit: 1e8e9bcc4d
Author: TangoCash <eric@loxat.de>
Date: 2017-11-10 (Fri, 10 Nov 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
Jacek Jendrzej
parent
0f626ebe02
commit
e3aeed5fde
@@ -1013,22 +1013,28 @@ void cPlayback::GetMetadata(std::vector<std::string> &keys, std::vector<std::str
|
|||||||
{
|
{
|
||||||
keys.clear();
|
keys.clear();
|
||||||
values.clear();
|
values.clear();
|
||||||
if (gst_tag_list_is_empty (m_stream_tags))
|
|
||||||
|
GstTagList *meta_list = gst_tag_list_copy(m_stream_tags);
|
||||||
|
|
||||||
|
if (meta_list == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (guint i = 0, icnt = gst_tag_list_n_tags(m_stream_tags); i < icnt; i++)
|
if (gst_tag_list_is_empty(meta_list))
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (guint i = 0, icnt = gst_tag_list_n_tags(meta_list); i < icnt; i++)
|
||||||
{
|
{
|
||||||
const gchar *name = gst_tag_list_nth_tag_name(m_stream_tags, i);
|
const gchar *name = gst_tag_list_nth_tag_name(meta_list, i);
|
||||||
if (!name)
|
if (!name)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (guint j = 0, jcnt = gst_tag_list_get_tag_size(m_stream_tags, name); j < jcnt; j++)
|
for (guint j = 0, jcnt = gst_tag_list_get_tag_size(meta_list, name); j < jcnt; j++)
|
||||||
{
|
{
|
||||||
const GValue *val;
|
const GValue *val;
|
||||||
|
|
||||||
val = gst_tag_list_get_value_index(m_stream_tags, name, j);
|
val = gst_tag_list_get_value_index(meta_list, name, j);
|
||||||
|
|
||||||
if (val == NULL)
|
if (val == NULL)
|
||||||
continue;
|
continue;
|
||||||
@@ -1071,6 +1077,7 @@ void cPlayback::GetMetadata(std::vector<std::string> &keys, std::vector<std::str
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
gst_tag_list_unref(meta_list);
|
||||||
printf("%s:%s %d tags found\n", FILENAME, __func__, (int)keys.size());
|
printf("%s:%s %d tags found\n", FILENAME, __func__, (int)keys.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user