I am using libav along with libfaac to encode audio into aac. following is the logic:

frames[n]
i = 0 ;
while (there are frames)
{ 
  cur_frame =  frames[i];
  av_encode_audio(frame, ...., &frame_finished);
  if( frame_finished )
  {
     i++;
  }
}

but I am getting this annoying warning for few frames "queue input is backward in time !"

有帮助吗?

解决方案

The answer is very simple, you are not supposed to pass the same frame again to the libfaac, so even if the frame_finished is not 1 you should still go to the next frame.

it should be as follows:

frames[n]
i = 0 ;
while (there are frames)
{ 
  cur_frame =  frames[i];
  av_encode_audio(frame, ...., &frame_finished);
  i++;
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top