From nobody Wed Mar 15 10:12:53 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pc5n13WkNz3yKch; Wed, 15 Mar 2023 10:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pc5n132zJz42VM; Wed, 15 Mar 2023 10:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678875173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Al0kOmUtVYfgPGEib5F9EGrDpsQAuOd/TNZqneWd2MM=; b=lIQIvrLly9wxbfPp4F2WfARd1oupvSBLfh/FPIbRqACrfsjyXcBB+TQFF7bTeX4rrbn7On ahBA7OaDyKq/uA5S4mifuvGRceQxj/pj0ryjz7KvVZRbksI/zKZm6XmKefVIg6yTvj3qi+ T7hF3EtLjS/N8Dd4ybsvaD/u8kP887gQx7JHd0div0fyUReuhgdobArstWvEf/ovK3Go+R 41/EWWtcliz3GZTyBUcikYcKQElIW+A1tHqVo8gOdb0AljsQj61NkO6wG4YphiDOWGETyz SDv+EqLnLHQ+yqPhTst7glzx62iQGd2Ga5J3ovRyhByJDT+zSUW0bGTcU1ClhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678875173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Al0kOmUtVYfgPGEib5F9EGrDpsQAuOd/TNZqneWd2MM=; b=WQ8Dw3+15HP1qddvLHkRhg/PFEyl/jfWsNcf7OiQS250uUSNrGihn4MCz+iDod4xirt7FD 0xnuHidcCn0PRhzKytIHIWiVCEMjSCex3KApnGopR9EuhNGgbO4PoIuWI5bIReeZfbS9GE 8CU2Oo7IUmNeu6adc8tJsaSsCfpKOawktdToiBv6/o0cxgKhB9EuHTlWqDt6nSeudL81eY Qh6lP4YFpJinaT6nhnipu+oxxfg7Y2oe1N4n5qmZxTGfmpJ6LqDeQRRV/tddT50vuKL/ak m4EVgQ56VLV1i6L6Z0avLPEmToRmyG5SEvbBVWFtI08/QBxjD8huf20+WKgRoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678875173; a=rsa-sha256; cv=none; b=VUiK961GRc6/hqckiLa3Gxwayqk2e1l8F+M3pt5tg9EA3VS/MWoYxj31zXTsl59br4Utn8 8lzX6TJ3GeYbmeia4KNm2+CTYIXL1Gc07BZrNlE+r6pPHIs+5yfvae6pSMub7DPyi5nD5T Jetd+52QBAmmN2fVivzTtIN7yuIa+AUKuDc/VjdKF6Pc3hHzLGaAYTCsbmsEqYkxrwlF1A gYHLtpDJoobBAJPtV5NBk2Br12NFoeFLl7t8VEX+59DFY4/uVCgs+9j/FH66XyLFnqSITo HjGb7mxOa3mgUg5QSLZs9o0oic45RCToNKPZe9s2ErV3uFu4KLUfaBJX0PmDVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pc5n122ZWz1CLl; Wed, 15 Mar 2023 10:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32FACrV8017643; Wed, 15 Mar 2023 10:12:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32FACrF9017642; Wed, 15 Mar 2023 10:12:53 GMT (envelope-from git) Date: Wed, 15 Mar 2023 10:12:53 GMT Message-Id: <202303151012.32FACrF9017642@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jan Beich Subject: git: deb6e280f48b - main - emulators/ppsspp: unbreak with ffmpeg 5.0 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: deb6e280f48bdf51bb253488e61d390ee88929ec Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=deb6e280f48bdf51bb253488e61d390ee88929ec commit deb6e280f48bdf51bb253488e61d390ee88929ec Author: Jan Beich AuthorDate: 2023-03-15 09:21:00 +0000 Commit: Jan Beich CommitDate: 2023-03-15 10:12:34 +0000 emulators/ppsspp: unbreak with ffmpeg 5.0 Core/HW/MediaEngine.cpp:437:12: error: no member named 'need_parsing' in 'AVStream' stream->need_parsing = AVSTREAM_PARSE_FULL; ~~~~~~ ^ Core/HW/MediaEngine.cpp:524:12: error: cannot initialize a variable of type 'AVCodec *' with an rvalue of type 'const AVCodec *' AVCodec *pCodec = avcodec_find_decoder(stream->codecpar->codec_id); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Core/HW/SimpleAudioDec.cpp:83:11: error: assigning to 'AVCodec *' from 'const AVCodec *' discards qualifiers codec_ = avcodec_find_decoder((AVCodecID)audioCodecId); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Core/HW/SimpleAudioDec.cpp:90:14: error: use of undeclared identifier 'avcodec_alloc_context3' codecCtx_ = avcodec_alloc_context3(codec_); ^ Core/HW/SimpleAudioDec.cpp:95:11: error: member access into incomplete type 'AVCodecContext' codecCtx_->channels = channels_; ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:96:11: error: member access into incomplete type 'AVCodecContext' codecCtx_->channel_layout = channels_ == 2 ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:97:11: error: member access into incomplete type 'AVCodecContext' codecCtx_->sample_rate = sample_rate_; ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:106:15: error: member access into incomplete type 'AVCodecContext' if (codecCtx_->block_align == 0) { ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:107:12: error: member access into incomplete type 'AVCodecContext' codecCtx_->block_align = block_align; ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:111:15: error: use of undeclared identifier 'avcodec_open2' int retval = avcodec_open2(codecCtx_, codec_, &opts); ^ Core/HW/SimpleAudioDec.cpp:126:12: error: member access into incomplete type 'AVCodecContext' codecCtx_->extradata = (uint8_t *)av_mallocz(size); ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:127:12: error: member access into incomplete type 'AVCodecContext' codecCtx_->extradata_size = size; ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:128:12: error: member access into incomplete type 'AVCodecContext' codecCtx_->block_align = wav_bytes_per_packet; ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:132:20: error: member access into incomplete type 'AVCodecContext' memcpy(codecCtx_->extradata, data, size); ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:149:12: error: member access into incomplete type 'AVCodecContext' codecCtx_->channels = channels_; ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:150:12: error: member access into incomplete type 'AVCodecContext' codecCtx_->channel_layout = channels_ == 2 ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:163:2: error: use of undeclared identifier 'avcodec_close'; did you mean 'avio_close'? avcodec_close(codecCtx_); ^~~~~~~~~~~~~ avio_close /usr/local/include/libavformat/avio.h:704:5: note: 'avio_close' declared here int avio_close(AVIOContext *s); ^ Core/HW/SimpleAudioDec.cpp:163:16: error: cannot initialize a parameter of type 'AVIOContext *' with an lvalue of type 'AVCodecContext *' avcodec_close(codecCtx_); ^~~~~~~~~ Core/HW/MediaEngine.h:41:8: note: 'AVCodecContext' is not defined, but forward declared here; conversion would be valid if it was derived from 'AVIOContext' struct AVCodecContext; ^ /usr/local/include/libavformat/avio.h:704:29: note: passing argument to parameter 's' here int avio_close(AVIOContext *s); ^ Core/HW/SimpleAudioDec.cpp:164:21: error: member access into incomplete type 'AVCodecContext' av_freep(&codecCtx_->extradata); ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:165:21: error: member access into incomplete type 'AVCodecContext' av_freep(&codecCtx_->subtitle_header); ^ Core/HW/MediaEngine.h:41:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HW/SimpleAudioDec.cpp:213:12: error: use of undeclared identifier 'avcodec_decode_audio4' int len = avcodec_decode_audio4(codecCtx_, frame_, &got_frame, &packet); ^ Core/HLE/sceAtrac.cpp:462:3: error: use of undeclared identifier 'avcodec_close'; did you mean 'avio_close'? avcodec_close(codecCtx_); ^~~~~~~~~~~~~ avio_close /usr/local/include/libavformat/avio.h:704:5: note: 'avio_close' declared here int avio_close(AVIOContext *s); ^ Core/HLE/sceAtrac.cpp:462:17: error: cannot initialize a parameter of type 'AVIOContext *' with an lvalue of type 'AVCodecContext *' avcodec_close(codecCtx_); ^~~~~~~~~ Core/HW/SimpleAudioDec.h:27:8: note: 'AVCodecContext' is not defined, but forward declared here; conversion would be valid if it was derived from 'AVIOContext' struct AVCodecContext; ^ /usr/local/include/libavformat/avio.h:704:29: note: passing argument to parameter 's' here int avio_close(AVIOContext *s); ^ Core/HLE/sceAtrac.cpp:468:3: error: use of undeclared identifier 'av_free_packet'; did you mean 'av_init_packet'? av_free_packet(packet_); ^~~~~~~~~~~~~~ av_init_packet /usr/local/include/libavcodec/packet.h:512:6: note: 'av_init_packet' declared here void av_init_packet(AVPacket *pkt); ^ Core/HLE/sceAtrac.cpp:477:3: error: use of undeclared identifier 'avcodec_flush_buffers' avcodec_flush_buffers(codecCtx_); ^ Core/HLE/sceAtrac.cpp:502:4: error: use of undeclared identifier 'avcodec_flush_buffers' avcodec_flush_buffers(codecCtx_); ^ Core/HLE/sceAtrac.cpp:591:20: error: use of undeclared identifier 'avcodec_decode_audio4' int bytes_read = avcodec_decode_audio4(codecCtx_, frame_, &got_frame, packet_); ^ Core/HLE/sceAtrac.cpp:596:3: error: use of undeclared identifier 'av_free_packet'; did you mean 'av_init_packet'? av_free_packet(packet_); ^~~~~~~~~~~~~~ av_init_packet /usr/local/include/libavcodec/packet.h:512:6: note: 'av_init_packet' declared here void av_init_packet(AVPacket *pkt); ^ Core/HLE/sceAtrac.cpp:1823:20: error: member access into incomplete type 'AVCodecContext' atrac->codecCtx_->sample_rate, ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceAtrac.cpp:1825:20: error: member access into incomplete type 'AVCodecContext' atrac->codecCtx_->sample_fmt, ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceAtrac.cpp:1826:20: error: member access into incomplete type 'AVCodecContext' atrac->codecCtx_->sample_rate, ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceAtrac.cpp:1856:21: error: use of undeclared identifier 'avcodec_alloc_context3' atrac->codecCtx_ = avcodec_alloc_context3(codec); ^ Core/HLE/sceAtrac.cpp:1860:19: error: member access into incomplete type 'AVCodecContext' atrac->codecCtx_->extradata = (uint8_t *)av_mallocz(14); ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceAtrac.cpp:1861:19: error: member access into incomplete type 'AVCodecContext' atrac->codecCtx_->extradata_size = 14; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceAtrac.cpp:1865:19: error: member access into incomplete type 'AVCodecContext' atrac->codecCtx_->extradata[0] = 1; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceAtrac.cpp:1866:19: error: member access into incomplete type 'AVCodecContext' atrac->codecCtx_->extradata[3] = atrac->channels_ << 3; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceAtrac.cpp:1867:19: error: member access into incomplete type 'AVCodecContext' atrac->codecCtx_->extradata[6] = atrac->jointStereo_; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceAtrac.cpp:1868:19: error: member access into incomplete type 'AVCodecContext' atrac->codecCtx_->extradata[8] = atrac->jointStereo_; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceAtrac.cpp:1869:19: error: member access into incomplete type 'AVCodecContext' atrac->codecCtx_->extradata[10] = 1; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceAtrac.cpp:1874:19: error: member access into incomplete type 'AVCodecContext' atrac->codecCtx_->channels = 1; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:804:12: error: cannot initialize a variable of type 'AVCodec *' with an rvalue of type 'const AVCodec *' AVCodec * pmp_Codec = avcodec_find_decoder(AV_CODEC_ID_H264); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Core/HLE/sceMpeg.cpp:811:34: error: use of undeclared identifier 'avcodec_alloc_context3' AVCodecContext * pmp_CodecCtx = avcodec_alloc_context3(pmp_Codec); ^ Core/HLE/sceMpeg.cpp:817:14: error: member access into incomplete type 'AVCodecContext' pmp_CodecCtx->flags |= AV_CODEC_FLAG_OUTPUT_CORRUPT | AV_CODEC_FLAG_LOW_DELAY; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:824:14: error: member access into incomplete type 'AVCodecContext' pmp_CodecCtx->width = 480; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:825:14: error: member access into incomplete type 'AVCodecContext' pmp_CodecCtx->height = 272; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:826:41: error: member access into incomplete type 'AVCodecContext' mediaengine->m_desHeight = pmp_CodecCtx->height; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:827:40: error: member access into incomplete type 'AVCodecContext' mediaengine->m_desWidth = pmp_CodecCtx->width; ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:830:6: error: use of undeclared identifier 'avcodec_open2' if (avcodec_open2(pmp_CodecCtx, pmp_Codec, NULL) < 0){ ^ Core/HLE/sceMpeg.cpp:847:76: error: member access into incomplete type 'AVCodecContext' mediaengine->m_bufSize = avpicture_get_size(pmp_want_pix_fmt, pmp_CodecCtx->width, pmp_CodecCtx->height); ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:847:97: error: member access into incomplete type 'AVCodecContext' mediaengine->m_bufSize = avpicture_get_size(pmp_want_pix_fmt, pmp_CodecCtx->width, pmp_CodecCtx->height); ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:986:35: error: member access into incomplete type 'AVCodecContext' av_new_packet(&packet, pCodecCtx->width*pCodecCtx->height); ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:1001:19: error: use of undeclared identifier 'AVPicture' avpicture_fill((AVPicture *)pFrameRGB, mediaengine->m_buffer, pmp_want_pix_fmt, pCodecCtx->width, pCodecCtx->height); ^ Core/HLE/sceMpeg.cpp:1001:30: error: expected expression avpicture_fill((AVPicture *)pFrameRGB, mediaengine->m_buffer, pmp_want_pix_fmt, pCodecCtx->width, pCodecCtx->height); ^ Core/HLE/sceMpeg.cpp:1001:92: error: member access into incomplete type 'AVCodecContext' avpicture_fill((AVPicture *)pFrameRGB, mediaengine->m_buffer, pmp_want_pix_fmt, pCodecCtx->width, pCodecCtx->height); ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:1001:110: error: member access into incomplete type 'AVCodecContext' avpicture_fill((AVPicture *)pFrameRGB, mediaengine->m_buffer, pmp_want_pix_fmt, pCodecCtx->width, pCodecCtx->height); ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:1020:13: error: use of undeclared identifier 'avcodec_decode_video2' int len = avcodec_decode_video2(pCodecCtx, pFrame, &got_picture, &packet); ^ Core/HLE/sceMpeg.cpp:1026:14: error: member access into incomplete type 'AVCodecContext' pCodecCtx->width, ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:1027:14: error: member access into incomplete type 'AVCodecContext' pCodecCtx->height, ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/HLE/sceMpeg.cpp:1028:14: error: member access into incomplete type 'AVCodecContext' pCodecCtx->pix_fmt, ^ Core/HW/SimpleAudioDec.h:27:8: note: forward declaration of 'AVCodecContext' struct AVCodecContext; ^ Core/AVIDump.cpp:148:10: error: assigning to 'AVCodec *' from 'const AVCodec *' discards qualifiers codec = avcodec_find_encoder(s_codec_context->codec_id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PR: 270201 Obtained from: upstream --- emulators/ppsspp/files/patch-ffmpeg5 | 106 +++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/emulators/ppsspp/files/patch-ffmpeg5 b/emulators/ppsspp/files/patch-ffmpeg5 new file mode 100644 index 000000000000..051628becfe7 --- /dev/null +++ b/emulators/ppsspp/files/patch-ffmpeg5 @@ -0,0 +1,106 @@ +https://github.com/hrydgard/ppsspp/issues/15308 + +--- Core/AVIDump.cpp.orig 2023-01-03 10:14:31 UTC ++++ Core/AVIDump.cpp +@@ -91,7 +91,7 @@ bool AVIDump::CreateAVI() { + + bool AVIDump::CreateAVI() { + #ifdef USE_FFMPEG +- AVCodec *codec = nullptr; ++ const AVCodec *codec = nullptr; + + // Use gameID_EmulatedTimestamp for filename + std::string discID = g_paramSFO.GetDiscID(); +--- Core/HLE/sceAtrac.cpp.orig 2023-01-03 10:14:31 UTC ++++ Core/HLE/sceAtrac.cpp +@@ -123,6 +123,7 @@ extern "C" { + #ifdef USE_FFMPEG + + extern "C" { ++#include "libavcodec/avcodec.h" + #include "libavformat/avformat.h" + #include "libswresample/swresample.h" + #include "libavutil/samplefmt.h" +--- Core/HLE/sceMpeg.cpp.orig 2023-01-03 10:14:31 UTC ++++ Core/HLE/sceMpeg.cpp +@@ -108,6 +108,7 @@ extern "C" { + #ifdef USE_FFMPEG + + extern "C" { ++#include "libavcodec/avcodec.h" + #include "libavformat/avformat.h" + #include "libavutil/imgutils.h" + #include "libswscale/swscale.h" +@@ -801,7 +802,7 @@ static bool InitPmp(MpegContext * ctx){ + pmp_want_pix_fmt = AV_PIX_FMT_RGBA; + + // Create H264 video codec +- AVCodec * pmp_Codec = avcodec_find_decoder(AV_CODEC_ID_H264); ++ const AVCodec * pmp_Codec = avcodec_find_decoder(AV_CODEC_ID_H264); + if (pmp_Codec == NULL){ + ERROR_LOG(ME, "Can not find H264 codec, please update ffmpeg"); + return false; +--- Core/HW/MediaEngine.cpp.orig 2023-01-03 10:14:31 UTC ++++ Core/HW/MediaEngine.cpp +@@ -38,6 +38,10 @@ extern "C" { + #include "libavutil/imgutils.h" + #include "libswscale/swscale.h" + ++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 23, 100) ++ // private libavformat api (see demux.h in ffmpeg src tree) ++ void avpriv_stream_set_need_parsing(AVStream *st, enum AVStreamParseType type); ++#endif + } + #endif // USE_FFMPEG + +@@ -434,7 +438,11 @@ bool MediaEngine::addVideoStream(int streamNum, int st + #else + stream->request_probe = 0; + #endif ++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 23, 100) ++ avpriv_stream_set_need_parsing(stream, AVSTREAM_PARSE_FULL); ++#else + stream->need_parsing = AVSTREAM_PARSE_FULL; ++#endif + // We could set the width here, but we don't need to. + if (streamNum >= m_expectedVideoStreams) { + ++m_expectedVideoStreams; +@@ -521,7 +529,7 @@ bool MediaEngine::setVideoStream(int streamNum, bool f + + AVStream *stream = m_pFormatCtx->streams[streamNum]; + #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100) +- AVCodec *pCodec = avcodec_find_decoder(stream->codecpar->codec_id); ++ const AVCodec *pCodec = avcodec_find_decoder(stream->codecpar->codec_id); + if (!pCodec) { + WARN_LOG_REPORT(ME, "Could not find decoder for %d", (int)stream->codecpar->codec_id); + return false; +--- Core/HW/SimpleAudioDec.cpp.orig 2023-01-03 10:14:31 UTC ++++ Core/HW/SimpleAudioDec.cpp +@@ -28,6 +28,7 @@ extern "C" { + #ifdef USE_FFMPEG + + extern "C" { ++#include "libavcodec/avcodec.h" + #include "libavformat/avformat.h" + #include "libswresample/swresample.h" + #include "libavutil/samplefmt.h" +--- Core/HW/SimpleAudioDec.h.orig 2023-01-03 10:14:31 UTC ++++ Core/HW/SimpleAudioDec.h +@@ -23,7 +23,7 @@ struct AVFrame; + #include "Core/HLE/sceAudio.h" + + struct AVFrame; +-struct AVCodec; ++const struct AVCodec; + struct AVCodecContext; + struct SwrContext; + +@@ -78,7 +78,7 @@ class SimpleAudio { (private) + int wanted_resample_freq; // wanted resampling rate/frequency + + AVFrame *frame_; +- AVCodec *codec_; ++ const AVCodec *codec_; + AVCodecContext *codecCtx_; + SwrContext *swrCtx_; +