modules/demux/avi/avi.c:

 * 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)
parent cb55dfe4
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* video.c: video decoder using the ffmpeg library * video.c: video decoder using the ffmpeg library
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * 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> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -219,6 +219,7 @@ int E_(InitVideoDec)( decoder_t *p_dec, AVCodecContext *p_context, ...@@ -219,6 +219,7 @@ int E_(InitVideoDec)( decoder_t *p_dec, AVCodecContext *p_context,
/* ***** Fill p_context with init values ***** */ /* ***** Fill p_context with init values ***** */
p_sys->p_context->width = p_dec->fmt_in.video.i_width; 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->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 ***** */ /* ***** Get configuration of ffmpeg plugin ***** */
i_tmp = config_GetInt( p_dec, "ffmpeg-workaround-bugs" ); i_tmp = config_GetInt( p_dec, "ffmpeg-workaround-bugs" );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc * avi.c : AVI file Stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2004 VideoLAN * 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> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -327,6 +327,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -327,6 +327,7 @@ static int Open( vlc_object_t * p_this )
tk->i_samplesize = 0; tk->i_samplesize = 0;
fmt.video.i_width = p_vids->p_bih->biWidth; fmt.video.i_width = p_vids->p_bih->biWidth;
fmt.video.i_height = p_vids->p_bih->biHeight; fmt.video.i_height = p_vids->p_bih->biHeight;
fmt.video.i_bits_per_pixel = p_vids->p_bih->biBitCount;
fmt.i_extra = fmt.i_extra =
__MIN( p_vids->p_bih->biSize - sizeof( BITMAPINFOHEADER ), __MIN( p_vids->p_bih->biSize - sizeof( BITMAPINFOHEADER ),
p_vids->i_chunk_size - 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 ) ...@@ -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 */ /* XXX DIV1 <- msmpeg4v1, DIV2 <- msmpeg4v2, DIV3 <- msmpeg4v3, mp4v for mpeg4 */
switch( i_codec ) switch( i_codec )
{ {
case FOURCC_1:
return VLC_FOURCC('m','r','l','e');
case FOURCC_DIV1: case FOURCC_DIV1:
case FOURCC_div1: case FOURCC_div1:
case FOURCC_MPG4: case FOURCC_MPG4:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libavi.h : LibAVI library * libavi.h : LibAVI library
****************************************************************************** ******************************************************************************
* Copyright (C) 2001-2003 VideoLAN * 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> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 ); ...@@ -293,6 +293,9 @@ void AVI_ChunkFreeRoot( stream_t *, avi_chunk_t *p_chk );
#define AVITWOCC_pc VLC_TWOCC('p','c') #define AVITWOCC_pc VLC_TWOCC('p','c')
/* *** codex stuff *** */ /* *** codex stuff *** */
/* Microsoft RLE video */
#define FOURCC_1 VLC_FOURCC( 1, 0, 0, 0 )
/* MPEG4 video */ /* MPEG4 video */
#define FOURCC_DIVX VLC_FOURCC('D','I','V','X') #define FOURCC_DIVX VLC_FOURCC('D','I','V','X')
#define FOURCC_divx VLC_FOURCC('d','i','v','x') #define FOURCC_divx VLC_FOURCC('d','i','v','x')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment