Commit be994e0f authored by Thomas Guillem's avatar Thomas Guillem

avcodec/encoder: fallback to 44100hz when rate is not supported

Better than faling, the transcode sout will convert the rate.
parent 228e6233
......@@ -911,10 +911,11 @@ errmsg:
if ( i_frequency == 6 )
{
msg_Err( p_enc, "MPEG audio doesn't support frequency=%d",
msg_Warn( p_enc, "MPEG audio doesn't support frequency=%d",
fmt->audio.i_rate );
av_dict_free(&options);
goto error;
/* Fallback to 44100 hz */
p_context->sample_rate = p_enc->fmt_in.audio.i_rate =
p_enc->fmt_out.audio.i_rate = 44100;
}
for ( i = 1; i < 14; i++ )
......
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