mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
gstreamer playback: fix possible segfault
This commit is contained in:
committed by
Jacek Jendrzej
parent
31a73a2bd5
commit
54341f0c48
@@ -948,9 +948,9 @@ void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *nu
|
|||||||
//(ac3flags[i] > 2) ? ac3flags[i] = 1 : ac3flags[i] = 0;
|
//(ac3flags[i] > 2) ? ac3flags[i] = 1 : ac3flags[i] = 0;
|
||||||
|
|
||||||
g_signal_emit_by_name (m_gst_playbin, "get-audio-tags", i, &tags);
|
g_signal_emit_by_name (m_gst_playbin, "get-audio-tags", i, &tags);
|
||||||
if (tags && GST_IS_TAG_LIST(tags))
|
if (tags)
|
||||||
{
|
{
|
||||||
if (gst_tag_list_get_string(tags, GST_TAG_LANGUAGE_CODE, &g_lang))
|
if (GST_IS_TAG_LIST(tags) && gst_tag_list_get_string(tags, GST_TAG_LANGUAGE_CODE, &g_lang))
|
||||||
{
|
{
|
||||||
std::string slang;
|
std::string slang;
|
||||||
if (gst_tag_check_language_code(g_lang))
|
if (gst_tag_check_language_code(g_lang))
|
||||||
@@ -1030,6 +1030,9 @@ void cPlayback::GetMetadata(std::vector<std::string> &keys, std::vector<std::str
|
|||||||
|
|
||||||
val = gst_tag_list_get_value_index(m_stream_tags, name, j);
|
val = gst_tag_list_get_value_index(m_stream_tags, name, j);
|
||||||
|
|
||||||
|
if (val == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (G_VALUE_HOLDS_STRING(val))
|
if (G_VALUE_HOLDS_STRING(val))
|
||||||
{
|
{
|
||||||
keys.push_back(name);
|
keys.push_back(name);
|
||||||
|
Reference in New Issue
Block a user