[vlc-devel] commit: avi: detect DivX XSUB subtitles. (Derk-Jan Hartman )

git version control git at videolan.org
Tue Apr 14 18:22:27 CEST 2009


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Tue Apr 14 18:20:18 2009 +0200| [d26e487068332936ddf24238d0f72a1e0912082b] | committer: Derk-Jan Hartman 

avi: detect DivX XSUB subtitles.

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

 modules/demux/avi/avi.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 643e3a6..bfea0b7 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -500,7 +500,13 @@ static int Open( vlc_object_t * p_this )
                 tk->i_cat   = VIDEO_ES;
                 tk->i_codec = AVI_FourccGetCodec( VIDEO_ES,
                                                   p_vids->p_bih->biCompression );
-                if( p_vids->p_bih->biCompression == 0x00 )
+                if( p_vids->p_bih->biCompression == VLC_FOURCC( 'D', 'X', 'S', 'B' ) )
+                {
+                   msg_Dbg( p_demux, "stream[%d] subtitles", i );
+                   es_format_Init( &fmt, SPU_ES, p_vids->p_bih->biCompression );
+                   break;
+                }
+                else if( p_vids->p_bih->biCompression == 0x00 )
                 {
                     switch( p_vids->p_bih->biBitCount )
                     {




More information about the vlc-devel mailing list