在海思3519上基于qt采用ffmpeg对avi进行解码显示,其中ffmpeg的配置,qt的配置在前文中已经说明,在此不再赘述. 解码 解码在单独的线程中进行,具体的代码如下: void VideoPlayer::run() { AVFormatContext *fmt_ctx = NULL; AVCodecContext *dec_ctx = NULL; AVFrame *pf = av_frame_alloc(); AVFrame *pfc = av_frame_alloc(); int v…