transcode: acodec aliases not supported
The transcode plugin should set the i_codec to the known VLC_FOURCC_* value while probing the encoder. But instead, it leaves the value given by the user.
So for instance, when setting acodec=ulaw, i_codec is not equal to VLC_FOURCC_MULAW (mlaw) and probing fails. The patch is obvious:
diff --git a/modules/stream_out/transcode/audio.c b/modules/stream_out/transcode/audio.c
index f2aa250..047f944 100644
--- a/modules/stream_out/transcode/audio.c
+++ b/modules/stream_out/transcode/audio.c
@@ -251,6 +251,9 @@ int transcode_audio_new( sout_stream_t *p_stream,
id->p_encoder->fmt_in.audio.i_bitspersample =
aout_BitsPerSample( id->p_encoder->fmt_in.i_codec );
+ id->p_encoder->fmt_out.i_codec =
+ vlc_fourcc_GetCodec( AUDIO_ES, id->p_encoder->fmt_out.i_codec );
+
id->p_encoder->p_cfg = p_stream->p_sys->p_audio_cfg;
id->p_encoder->p_module =
module_need( id->p_encoder, "encoder", p_sys->psz_aenc, true );
@@ -302,10 +305,6 @@ int transcode_audio_new( sout_stream_t *p_stream,
}
fmt_last = id->p_encoder->fmt_in;
- /* */
- id->p_encoder->fmt_out.i_codec =
- vlc_fourcc_GetCodec( AUDIO_ES, id->p_encoder->fmt_out.i_codec );
-
return VLC_SUCCESS;
}
But that patch (probably) breaks MP3 encoding in lavc...