AC3音频帧每个数据包大小



我确实以以下方式创建音频队列

AudioQueueNewOutput(&audioFormat, audioQueueOutputCallback, (__bridge void*)self, NULL, NULL, 0, &mAudioQueue)

如果格式遵循

audioFormat.mFormatID = kAudioFormatAC3;                
audioFormat.mBytesPerPacket = 0;
audioFormat.mFramesPerPacket = mavfContext->streams[audio_index]->codec->frame_size;
audioFormat.mBytesPerFrame = 0;
audioFormat.mChannelsPerFrame = mavfContext->streams[audio_index]->codec->channels;
audioFormat.mBitsPerChannel = 0;

创建失败,出现kAudioFormatUnsupportedDataFormatError。我已检查mavfContext->streams[audio_index]->codec->frame_size是否为0。那么,ac3媒体的mFramesPerPacket有什么标准值吗?

AC3帧大小应该是256*通道,因此这里我希望:

CCD_ 2。

最新更新