mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
dvbbasebin: fix path where to look for the dvb-channels.conf
Construct path based on the API version, not $major.$minor version.
This commit is contained in:
parent
b40c9ff39a
commit
3bacb6312c
1 changed files with 8 additions and 5 deletions
|
@ -21,6 +21,10 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -56,6 +60,8 @@ parse_channels_conf_from_file (GstElement * dvbbasebin, const gchar * filename)
|
|||
GHashTable *res;
|
||||
GError *err = NULL;
|
||||
|
||||
GST_INFO_OBJECT (dvbbasebin, "parsing '%s'", filename);
|
||||
|
||||
if (!g_file_get_contents (filename, &contents, NULL, &err))
|
||||
goto open_fail;
|
||||
|
||||
|
@ -183,11 +189,8 @@ set_properties_for_channel (GstElement * dvbbasebin, const gchar * channel_name)
|
|||
|
||||
filename = g_strdup (g_getenv ("GST_DVB_CHANNELS_CONF"));
|
||||
if (filename == NULL) {
|
||||
guint major, minor, micro, nano;
|
||||
|
||||
gst_version (&major, &minor, µ, &nano);
|
||||
filename = g_strdup_printf ("%s/gstreamer-%d.%d/dvb-channels.conf",
|
||||
g_get_user_config_dir (), major, minor);
|
||||
filename = g_build_filename (g_get_user_config_dir (),
|
||||
"gstreamer-" GST_API_VERSION, "dvb-channels.conf", NULL);
|
||||
}
|
||||
channels = parse_channels_conf_from_file (dvbbasebin, filename);
|
||||
g_free (filename);
|
||||
|
|
Loading…
Reference in a new issue