Commit 18d00033 authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/ffmpeg/video.c: setup dummy palette to avoid segfaults with some codecs.
* modules/codec/ffmpeg/ffmpeg.c: more fourccs.
parent c3089d64
......@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.74 2004/01/08 23:21:01 sigmunau Exp $
* $Id: ffmpeg.c,v 1.75 2004/01/09 00:02:55 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
......@@ -565,18 +565,21 @@ static struct
{ VLC_FOURCC('R','V','1','3'), CODEC_ID_RV10,
VIDEO_ES, "Real Video 13" },
#if LIBAVCODEC_BUILD >= 4683
#if LIBAVCODEC_BUILD >= 4684
/* Apple Video */
{ VLC_FOURCC('r','p','z','a'), CODEC_ID_RPZA,
VIDEO_ES, "Apple Video" },
#endif
{ VLC_FOURCC('s','m','c',' '), CODEC_ID_SMC,
VIDEO_ES, "Apple graphics" },
#if LIBAVCODEC_BUILD >= 4683
/* Cinepak */
{ VLC_FOURCC('c','v','i','d'), CODEC_ID_CINEPAK,
VIDEO_ES, "Cinepak Video" },
/* Id Quake II CIN */
{ VLC_FOURCC('I','D','C','I'), CODEC_ID_IDCIN,
VIDEO_ES, "Id Quake II CIN Video" },
#endif
/* 4X Technologies */
......@@ -589,6 +592,10 @@ static struct
VIDEO_ES, "Duck TrueMotion v1 Video" },
#endif
/* Interplay MVE */
{ VLC_FOURCC('i','m','v','e'), CODEC_ID_INTERPLAY_VIDEO,
VIDEO_ES, "Interplay MVE Video" },
/*
* Audio Codecs
*/
......@@ -645,6 +652,10 @@ static struct
{ VLC_FOURCC('4','x','m','a'), CODEC_ID_ADPCM_4XM,
AUDIO_ES, "4X Technologies Audio" },
/* Interplay DPCM */
{ VLC_FOURCC('i','d','p','c'), CODEC_ID_INTERPLAY_DPCM,
AUDIO_ES, "Interplay DPCM Audio" },
/* PCM */
{ VLC_FOURCC('s','8',' ',' '), CODEC_ID_PCM_S8,
AUDIO_ES, "PCM S8" },
......
......@@ -2,7 +2,7 @@
* video.c: video decoder using the ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: video.c,v 1.58 2004/01/08 00:12:50 gbazin Exp $
* $Id: video.c,v 1.59 2004/01/09 00:02:55 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
......@@ -81,6 +81,9 @@ struct decoder_sys_t
vlc_bool_t b_pp_init;
};
/* FIXME (dummy palette for now) */
static AVPaletteControl palette_control;
/*****************************************************************************
* Local prototypes
*****************************************************************************/
......@@ -332,6 +335,9 @@ int E_(InitVideoDec)( decoder_t *p_dec, AVCodecContext *p_context,
p_dec->fmt_out.i_cat = VIDEO_ES;
p_dec->fmt_out.i_codec = ffmpeg_PixFmtToChroma( p_context->pix_fmt );
/* Setup dummy palette to avoid segfaults with some codecs */
p_sys->p_context->palctrl = &palette_control;
/* ***** Open the codec ***** */
vlc_mutex_lock( lockval.p_address );
if( avcodec_open( p_sys->p_context, p_sys->p_codec ) < 0 )
......
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