int mmfile_format_open_ffmpg(MMFileFormatContext *formatContext)
{
- AVFormatContext *pFormatCtx = NULL;
- AVInputFormat *grab_iformat = NULL;
+ AVFormatContext *pFormatCtx = NULL;
+ const AVInputFormat *grab_iformat = NULL;
char ffmpegFormatName[MMFILE_FILE_FMT_MAX_LEN] = {0, };
- AVIOContext *pIOCtx = NULL;
+ AVIOContext *pIOCtx = NULL;
MMFmemIOHandle *handle = NULL;
uint8_t *avio_ctx_buffer = NULL;
if (pAudioCodecCtx) {
audioStream->codecId = __convert_audio_codec_type(pAudioCodecCtx->codec_id);
audioStream->bitRate = pAudioCodecCtx->bit_rate;
- audioStream->nbChannel = pAudioCodecCtx->channels;
+ audioStream->nbChannel = pAudioCodecCtx->ch_layout.nb_channels;
audioStream->samplePerSec = pAudioCodecCtx->sample_rate;
audioStream->bitPerSample = pAudioCodecCtx->bits_per_coded_sample;
audioStream->is_uhqa = __check_uhqa(audioStream->samplePerSec, pFormatCtx->streams[i]->codecpar->format);
{
AVFormatContext *pFormatCtx = NULL;
AVCodecContext *pVideoCodecCtx = NULL;
- AVCodec *pVideoCodec = NULL;
+ const AVCodec *pVideoCodec = NULL;
AVCodecParameters *pVideoCodecPar = NULL;
AVFrame *pFrame = NULL;
struct SwsContext *img_convert_ctx = NULL;
{
AVCodecContext *pVideoCodecCtx = NULL;
AVCodecParameters *pVideoCodecPar = NULL;
- AVCodec *pVideoCodec = NULL;
+ const AVCodec *pVideoCodec = NULL;
/* Get a pointer to the codec context for the video stream */
pVideoCodecPar = pFormatCtx->streams[videoStream]->codecpar;
char ffmpegFormatName[MMFILE_FILE_FMT_MAX_LEN] = {0, };
char *urifilename = NULL;
AVFormatContext *pFormatCtx = NULL;
- AVInputFormat *grab_iformat = NULL;
+ const AVInputFormat *grab_iformat = NULL;
AVIOContext *pIOCtx = NULL;
MMFmemIOHandle *handle = NULL;
uint8_t *avio_ctx_buffer = NULL;