ffmpeg生成的视频无法被quicktime和ios设备播放的问题

解决方法:

if (pFormatCtx->oformat->flags & AVFMT_GLOBALHEADER) {

        pCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;

    }


注释:

pFormatCtx为AVFormatContext

pCodecCtx为AVCodecContext

猜你喜欢

转载自blog.csdn.net/yvhkyiu/article/details/80455703