]> git.sesse.net Git - vlc/commitdiff
modules/demux/avi/avi.c:
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Sun, 8 Feb 2004 18:30:30 +0000 (18:30 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Sun, 8 Feb 2004 18:30:30 +0000 (18:30 +0000)
 * pass bit per pixel info on to decoder
modules/demux/avi/libavi.h:
 * add 1 as fourcc for msrle
module/codec/ffmpeg/video.c:
 * pass bit per pixel info to libavcodec (needed for msrle)

modules/codec/ffmpeg/video.c
modules/demux/avi/avi.c
modules/demux/avi/libavi.h

index 8c4467cb85caa3b9240ca4ee3caafcf20c4a82c1..a52120dbbb5e1afbd5d46cc2bf00b6ad2ea82219 100644 (file)
@@ -2,7 +2,7 @@
  * video.c: video decoder using the ffmpeg library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video.c,v 1.63 2004/02/08 12:09:50 gbazin Exp $
+ * $Id: video.c,v 1.64 2004/02/08 18:30:30 sigmunau Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -219,6 +219,7 @@ int E_(InitVideoDec)( decoder_t *p_dec, AVCodecContext *p_context,
     /* ***** Fill p_context with init values ***** */
     p_sys->p_context->width  = p_dec->fmt_in.video.i_width;
     p_sys->p_context->height = p_dec->fmt_in.video.i_height;
+    p_sys->p_context->bits_per_sample = p_dec->fmt_in.video.i_bits_per_pixel;
 
     /*  ***** Get configuration of ffmpeg plugin ***** */
     i_tmp = config_GetInt( p_dec, "ffmpeg-workaround-bugs" );
index 52db641df11a35d6af95605230e7e0dca4b202c9..0cf28f19133462fb270ada03544ac71e66565895 100644 (file)
@@ -2,7 +2,7 @@
  * avi.c : AVI file Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2001-2004 VideoLAN
- * $Id: avi.c,v 1.86 2004/01/31 14:49:52 fenrir Exp $
+ * $Id: avi.c,v 1.87 2004/02/08 18:30:30 sigmunau Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -327,6 +327,7 @@ static int Open( vlc_object_t * p_this )
                 tk->i_samplesize = 0;
                 fmt.video.i_width  = p_vids->p_bih->biWidth;
                 fmt.video.i_height = p_vids->p_bih->biHeight;
+                fmt.video.i_bits_per_pixel = p_vids->p_bih->biBitCount;
                 fmt.i_extra =
                     __MIN( p_vids->p_bih->biSize - sizeof( BITMAPINFOHEADER ),
                            p_vids->i_chunk_size - sizeof(BITMAPINFOHEADER) );
@@ -1581,6 +1582,8 @@ vlc_fourcc_t AVI_FourccGetCodec( unsigned int i_cat, vlc_fourcc_t i_codec )
             /* XXX DIV1 <- msmpeg4v1, DIV2 <- msmpeg4v2, DIV3 <- msmpeg4v3, mp4v for mpeg4 */
             switch( i_codec )
             {
+                case FOURCC_1:
+                    return VLC_FOURCC('m','r','l','e');
                 case FOURCC_DIV1:
                 case FOURCC_div1:
                 case FOURCC_MPG4:
index 68ec9751ed3f7dba7124f136756e7851d71a2547..9ceacb479ffc00937c048cb880307764a882894c 100644 (file)
@@ -2,7 +2,7 @@
  * libavi.h : LibAVI library
  ******************************************************************************
  * Copyright (C) 2001-2003 VideoLAN
- * $Id: libavi.h,v 1.14 2004/01/25 20:05:28 hartman Exp $
+ * $Id: libavi.h,v 1.15 2004/02/08 18:30:30 sigmunau Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -293,6 +293,9 @@ void    AVI_ChunkFreeRoot( stream_t *, avi_chunk_t  *p_chk );
 #define AVITWOCC_pc            VLC_TWOCC('p','c')
     /* *** codex stuff ***  */
 
+    /* Microsoft RLE video */
+#define FOURCC_1            VLC_FOURCC( 1,  0,  0,  0 )
+
     /* MPEG4 video */
 #define FOURCC_DIVX         VLC_FOURCC('D','I','V','X')
 #define FOURCC_divx         VLC_FOURCC('d','i','v','x')