[MPlayer-cvslog] r33126 - trunk/libmpcodecs/ae_lavc.c

reimar subversion at mplayerhq.hu
Sun Mar 27 12:24:11 CEST 2011


Author: reimar
Date: Sun Mar 27 12:24:11 2011
New Revision: 33126

Log:
Warn when audio encoder requires an input format different from S16,
it is not working correctly currently.

Modified:
   trunk/libmpcodecs/ae_lavc.c

Modified: trunk/libmpcodecs/ae_lavc.c
==============================================================================
--- trunk/libmpcodecs/ae_lavc.c	Sun Mar 27 09:16:38 2011	(r33125)
+++ trunk/libmpcodecs/ae_lavc.c	Sun Mar 27 12:24:11 2011	(r33126)
@@ -188,6 +188,9 @@ int mpae_init_lavc(audio_encoder_t *enco
 	lavc_actx->codec_id = lavc_acodec->id;
 	// put sample parameters
 	lavc_actx->sample_fmt = lavc_acodec->sample_fmts ? lavc_acodec->sample_fmts[0] : AV_SAMPLE_FMT_S16;
+	if (lavc_actx->sample_fmt != AV_SAMPLE_FMT_S16)
+	    mp_msg(MSGT_MENCODER, MSGL_ERR, "Encoder requires input not properly supported."
+	                                    "Try using e.g. 'ac3_fixed' instead if 'ac3' as codec\n");
 	encoder->input_format = samplefmt2affmt(lavc_actx->sample_fmt);
 	lavc_actx->channels = encoder->params.channels;
 	lavc_actx->sample_rate = encoder->params.sample_rate;


More information about the MPlayer-cvslog mailing list