Commit 97ef3628 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: map AV_CODEC_ID_NONE

parent 9de91838
......@@ -255,7 +255,8 @@ static int OpenDecoder( vlc_object_t *p_this )
/* *** determine codec type *** */
if( !GetFfmpegCodec( p_dec->fmt_in.i_codec, &i_cat, &i_codec_id,
&psz_namecodec ) )
&psz_namecodec )
|| i_cat == UNKNOWN_ES )
{
return VLC_EGENERIC;
}
......
......@@ -279,6 +279,9 @@ int OpenEncoder( vlc_object_t *p_this )
psz_namecodec = "Raw video";
}
if( i_cat == UNKNOWN_ES )
return VLC_EGENERIC;
if( p_enc->fmt_out.i_cat == VIDEO_ES && i_cat != VIDEO_ES )
{
msg_Err( p_enc, "\"%s\" is not a video encoder", psz_namecodec );
......
......@@ -43,6 +43,8 @@ static const struct
int i_cat;
} codecs_table[] =
{
{ 0, AV_CODEC_ID_NONE, UNKNOWN_ES },
/*
* Video Codecs
*/
......
......@@ -180,7 +180,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
msg_Dbg( p_mux, "adding input" );
if( !GetFfmpegCodec( fmt->i_codec, 0, &i_codec_id, 0 ) )
if( !GetFfmpegCodec( fmt->i_codec, 0, &i_codec_id, 0 )
|| i_codec_id == AV_CODEC_ID_NONE )
{
msg_Dbg( p_mux, "couldn't find codec for fourcc '%4.4s'",
(char *)&fmt->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