- if ( g_strrstr(sourceName, "videosink") )
- m_event((iPlayableService*)this, evUser+11);
+ if ( err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND )
+ {
+ if ( g_strrstr(sourceName, "videosink") )
+ m_event((iPlayableService*)this, evUser+11);
+ else if ( g_strrstr(sourceName, "audiosink") )
+ m_event((iPlayableService*)this, evUser+10);
+ }
+ else if ( err->code == GST_STREAM_ERROR_FAILED && g_strrstr(sourceName, "file-source") )
+ {
+ eWarning("error in tag parsing, linking mp3parse directly to file-sink, bypassing id3demux...");
+ GstElement *source = gst_bin_get_by_name(GST_BIN(m_gst_pipeline),"file-source");
+ GstElement *parser = gst_bin_get_by_name(GST_BIN(m_gst_pipeline),"audiosink");
+ gst_element_set_state(m_gst_pipeline, GST_STATE_NULL);
+ gst_element_unlink(source, gst_bin_get_by_name(GST_BIN(m_gst_pipeline),"id3demux"));
+ gst_element_link(source, parser);
+ gst_element_set_state (m_gst_pipeline, GST_STATE_PLAYING);
+ }