]> git.sesse.net Git - vlc/commitdiff
qt4: little fix for sout-http muxing check
authorIlkka Ollakka <ileoo@videolan.org>
Sun, 16 May 2010 11:22:57 +0000 (14:22 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 16 May 2010 11:22:57 +0000 (14:22 +0300)
First priority is file-extension user gives, if that isn't
specified, use mux-value and if that's not valid (eg mp4), fallback
to flv-muxing.

modules/gui/qt4/components/sout/sout_widgets.cpp

index 02ad3bec5d32673aad47bb7fcf0542987eb527aa..497ea6ef494d43d381de464a7a3513fc625897e1 100644 (file)
@@ -186,12 +186,16 @@ QString HTTPDestBox::getMRL( const QString& mux )
 
     SoutMrl m;
     m.begin( "http" );
-    /* http-output can't do mp4-mux, so don't accept it,
-       if we don't get usable mux, fallback to flv */
-    if( !mux.isEmpty() && mux.compare("mp4") )
-        m.option( "mux", mux );
-    else if ( !path.contains(QRegExp("\\..{2,3}$") ) )
-        m.option( "mux", "ffmpeg{mux=flv}" );
+    /* Path-extension is primary muxer to use if possible,
+       otherwise check for mux-choise and see that it isn't mp4
+       then fallback to flv*/
+    if ( !path.contains(QRegExp("\\..{2,3}$") ) )
+    {
+        if( !mux.isEmpty() && mux.compare("mp4") )
+           m.option( "mux", mux );
+        else
+           m.option( "mux", "ffmpeg{mux=flv}" );
+    }
     m.option( "dst", dst );
     m.end();