2,275
社区成员
发帖
与我相关
我的任务
分享
// 1. find decoder
mpCodec = avcodec_find_decoder(CODEC_ID_ALAC);
if (mpCodec == NULL) {
LOGE("find codec failed");
return;
} else {
LOGE("find codec successfully");
}
mpCodecContext = avcodec_alloc_context(); //这个结构体,还需要初始化其他的参数来打开解码器吗?
// 2 open codec
if (avcodec_open(mpCodecContext, mpCodec) < 0) {
LOGE("Open codec failed");
return;
} else {
LOGE("Open codec successfully");
}