gst loader - early quit if gst stream has no video streams

this should fix the hang/pause in T551. so T551 fixed by this.
This commit is contained in:
Carsten Haitzler 2013-11-27 00:12:18 +09:00
parent 503d648c2a
commit e84ed727b0
1 changed files with 10 additions and 0 deletions

View File

@ -45,6 +45,7 @@ _gst_init(const char *filename)
GError *error = NULL;
GstFormat format;
GstStateChangeReturn ret;
int vidstr = 0;
if (!filename || !*filename)
return EINA_FALSE;
@ -77,6 +78,15 @@ _gst_init(const char *filename)
g_error_free (error);
goto gst_shutdown;
}
g_object_get(G_OBJECT(pipeline),
"n-video", &vidstr,
NULL);
if (vidstr <= 0)
{
D("no video stream\n");
goto gst_shutdown;
}
sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");