mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-17 13:19:59 +01:00
Non fatal Warning on gstreamer discovery of unknown format
uridecodebin can fail for one of the media stream (e.g. audio) and still be able to load video.
This commit is contained in:
@@ -152,8 +152,9 @@ MediaInfo MediaPlayer::UriDiscoverer(const std::string &uri)
|
|||||||
{
|
{
|
||||||
const GstStructure *s = gst_discoverer_info_get_misc (info);
|
const GstStructure *s = gst_discoverer_info_get_misc (info);
|
||||||
gchar *str = gst_structure_to_string (s);
|
gchar *str = gst_structure_to_string (s);
|
||||||
video_stream_info.log = std::string( "Unknown format; " ) + std::string(str);
|
video_stream_info.log = std::string( "Warning: " ) + std::string(str);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
|
result = GST_DISCOVERER_OK; // try to read the file anyways, discoverer can report errors but still read the file
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -948,6 +949,9 @@ void MediaPlayer::update()
|
|||||||
media_ = discoverer_.get();
|
media_ = discoverer_.get();
|
||||||
// if its ok, open the media
|
// if its ok, open the media
|
||||||
if (media_.valid) {
|
if (media_.valid) {
|
||||||
|
if (!media_.log.empty())
|
||||||
|
Log::Info("'%s' : %s", uri().c_str(), media_.log.c_str());
|
||||||
|
|
||||||
timeline_.setEnd( media_.end );
|
timeline_.setEnd( media_.end );
|
||||||
timeline_.setStep( media_.dt );
|
timeline_.setStep( media_.dt );
|
||||||
execute_open();
|
execute_open();
|
||||||
|
|||||||
Reference in New Issue
Block a user