[Ffmpeg-devel] AC3 5.1 file is detected as one channel instead of 6.

Thomas Parmegiani thomasp
Tue Oct 31 16:01:48 CET 2006


av_find_stream_info(ic);

for(int j = 0; j < ic->nb_streams; j++)
 {
  AVCodecContext *dec = ic->streams[j]->codec;

  switch(dec->codec_type)
  {
   case CODEC_TYPE_AUDIO:
    {
      iChannel = dec->channels;//1 instead of 6.
      break;
    }
}


dec->channels returns 1 instead of 6 for an AC3 5.1 file.
Do I use the wrong variable ?

Best Regards,

Thomas.P




More information about the ffmpeg-devel mailing list