vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sun Dec 20 
20:26:57 2015 +0200| [49f45bd58204824d1836a7eb60010b54cc5fc1b3] | committer: 
Rémi Denis-Courmont

flac: use demux_IsContentType()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=49f45bd58204824d1836a7eb60010b54cc5fc1b3
---

 modules/demux/flac.c |   13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/modules/demux/flac.c b/modules/demux/flac.c
index 9221c61..c220388 100644
--- a/modules/demux/flac.c
+++ b/modules/demux/flac.c
@@ -119,16 +119,9 @@ static int Open( vlc_object_t * p_this )
 
     if( p_peek[0]!='f' || p_peek[1]!='L' || p_peek[2]!='a' || p_peek[3]!='C' )
     {
-        if( !p_demux->b_force )
-        {
-            char *psz_mime = stream_ContentType( p_demux->s );
-            if ( !psz_mime || strcmp( psz_mime, "audio/flac" ) )
-            {
-                free( psz_mime );
-                return VLC_EGENERIC;
-            }
-            free( psz_mime );
-        }
+        if( !p_demux->b_force
+         && !demux_IsContentType( p_demux->s, "audio/flac" ) )
+            return VLC_EGENERIC;
 
         /* User forced */
         msg_Err( p_demux, "this doesn't look like a flac stream, "

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to