It has been a long time since March (I just joined this group today) but
the cause of your problem is due to an upgrade in ffmpeg. The current
versions of ffmpeg have two ac3 codecs (ac3 & ac3_fixed). Cinelerra uses
the ac3 codec without defining a sample format. The ac3 codec only
supports floating-point samples while your audio samples are most likely
16bit fixed point. The following patch should fix this problem:
diff -ur cinelerra-cv_orig/cinelerra/fileac3.C
cinelerra-cv_fixed/cinelerra/fileac3.C
--- cinelerra-cv_orig/cinelerra/fileac3.C 2011-09-06 12:00:27.000000000
-0400
+++ cinelerra-cv_fixed/cinelerra/fileac3.C 2011-09-05 15:10:15.000000000
-0400
@@ -86,7 +86,8 @@
{
avcodec_init();
avcodec_register_all();
- codec = avcodec_find_encoder(CODEC_ID_AC3);
+// codec = avcodec_find_encoder(CODEC_ID_AC3);
+ codec = avcodec_find_encoder_by_name( "ac3_fixed" );
if(!codec)
{
eprintf("codec not found.\n");
@@ -96,9 +97,14 @@
codec_context->bit_rate = asset->ac3_bitrate * 1000;
codec_context->sample_rate = asset->sample_rate;
codec_context->channels = asset->channels;
+ codec_context->sample_fmt = AV_SAMPLE_FMT_S16;
+ if(asset->channels = 6)
+ codec_context->channel_layout = AV_CH_LAYOUT_5POINT1;
+//printf("FileAC3::open_file 1 Rate=%d Sample=%d Channels=%d Codec=0x%x
\n", codec_context->bit_rate, codec_context->sample_rate, codec_c
ontext->channels, codec);
if(avcodec_open(codec_context, codec))
{
eprintf("failed to open codec.\n");
+//printf("FileAC3::open_file 2 failed to open codec.\n");
return 1;
}