QtAV icon indicating copy to clipboard operation
QtAV copied to clipboard

Deprecated API error

Open MingqianYang opened this issue 4 years ago • 3 comments

        if (!avt.createAudioEncoder()) {
            qWarning("Failed to create audio encoder");
            return 1;
        }

There will be a problem if we build with the latest ffmpeg for using the deprecated api in the file AudioEncoderFFmpeg.cpp. The line number is 207. int ret = avcodec_encode_audio2(d.avctx, &pkt, f, &got_packet);

捕获 the latest source file saying:

de

here is the debug issue dePNG

Originally posted by @MingqianYang in https://github.com/wang-bin/QtAV/issues/1338#issuecomment-751191567

MingqianYang avatar Dec 25 '20 07:12 MingqianYang

patches are welcome

wang-bin avatar Dec 25 '20 08:12 wang-bin

patches

What do you mean patches? Could you be more specific? And it says

[FFmpeg:?] Error avcodec_open2(avctx, codec, &dict) @72 D:\CODE\QtAV-master\src\codec\audio\AudioEncoderFFmpeg.cpp: (0xffffffea) Invalid argument
[FFmpeg:NULL] No codec provided to avcodec_open2()

des获

MingqianYang avatar Dec 25 '20 09:12 MingqianYang

What do you mean patches?

He means if you know how to fix it, you could fix it yourself and make a pull request.

wangwenx190 avatar Mar 08 '21 02:03 wangwenx190