Commit cada6d07 authored by Laurent Aimar's avatar Laurent Aimar

* all: add wmv1/2 codec support.

parent c72215f6
......@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.7 2002/10/14 21:59:44 fenrir Exp $
* $Id: ffmpeg.c,v 1.8 2002/10/20 17:28:01 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -288,7 +288,7 @@ static void __PES_NEXT( decoder_fifo_t *p_fifo )
vlc_mutex_unlock( &p_fifo->data_lock );
}
static inline void __GetFrame( videodec_thread_t *p_vdec )
static void __GetFrame( videodec_thread_t *p_vdec )
{
pes_packet_t *p_pes;
data_packet_t *p_data;
......@@ -334,7 +334,7 @@ static inline void __GetFrame( videodec_thread_t *p_vdec )
} while( p_data );
}
static inline void __NextFrame( videodec_thread_t *p_vdec )
static void __NextFrame( videodec_thread_t *p_vdec )
{
__PES_NEXT( p_vdec->p_fifo );
}
......@@ -666,13 +666,13 @@ static int InitThread( videodec_thread_t *p_vdec )
}
/* ***** Fill p_context with init values ***** */
#if LIBAVCODEC_BUILD >= 4624
p_vdec->p_context = avcodec_alloc_context();
#else
//#if LIBAVCODEC_BUILD >= 4624
// p_vdec->p_context = avcodec_alloc_context();
//#else
p_vdec->p_context = malloc( sizeof( AVCodecContext ) );
memset( p_vdec->p_context, 0, sizeof( AVCodecContext ) );
#endif
//#endif
p_vdec->p_context->width = p_vdec->format.i_width;
p_vdec->p_context->height = p_vdec->format.i_height;
......
......@@ -2,7 +2,7 @@
* ffmpeg_vdec.h: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ffmpeg.h,v 1.4 2002/10/14 21:59:44 fenrir Exp $
* $Id: ffmpeg.h,v 1.5 2002/10/20 17:28:01 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -144,6 +144,10 @@ typedef struct videodec_thread_s
/* Sorenson v1 */
#define FOURCC_SVQ1 VLC_FOURCC( 'S', 'V', 'Q', '1' )
/* wmv */
#define FOURCC_WMV1 VLC_FOURCC('W','M','V','1')
#define FOURCC_WMV2 VLC_FOURCC('W','M','V','2')
static int ffmpeg_GetFfmpegCodec( vlc_fourcc_t i_fourcc,
int *pi_ffmpeg_codec,
char **ppsz_name )
......@@ -230,6 +234,15 @@ static int ffmpeg_GetFfmpegCodec( vlc_fourcc_t i_fourcc,
i_codec = CODEC_ID_H263I;
psz_name = "I263.I";
break;
case FOURCC_WMV1:
i_codec = CODEC_ID_WMV1;
psz_name ="Windows Media Video 1";
break;
case FOURCC_WMV2:
i_codec = CODEC_ID_WMV2;
psz_name ="Windows Media Video 2";
break;
}
if( i_codec )
......
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