[vlc-commits] demux: ogg: probe by mime type (fix #10222)
Francois Cartegnie
git at videolan.org
Thu Apr 24 20:45:12 CEST 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 24 20:37:26 2014 +0200| [aacada0b9b1d6a3ea09c75ceb61693b22aab43bd] | committer: Francois Cartegnie
demux: ogg: probe by mime type (fix #10222)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aacada0b9b1d6a3ea09c75ceb61693b22aab43bd
---
modules/demux/ogg.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index b6de5df..1f8b081 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -204,7 +204,19 @@ static int Open( vlc_object_t * p_this )
if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 ) return VLC_EGENERIC;
if( !p_demux->b_force && memcmp( p_peek, "OggS", 4 ) )
{
- return VLC_EGENERIC;
+ char *psz_mime = stream_ContentType( p_demux->s );
+ if( !psz_mime )
+ {
+ return VLC_EGENERIC;
+ }
+ else if ( strcmp( psz_mime, "application/ogg" ) &&
+ strcmp( psz_mime, "video/ogg" ) &&
+ strcmp( psz_mime, "audio/ogg" ) )
+ {
+ free( psz_mime );
+ return VLC_EGENERIC;
+ }
+ free( psz_mime );
}
/* */
More information about the vlc-commits
mailing list