HomeFreeBSD

emulators/ppsspp: unbreak with ffmpeg 5.0

Description

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

Details

Provenance
jbeichAuthored on Mar 15 2023, 9:21 AM
Parents
R11:d6ed3ffd47ec: games/vkquake: update to 1.30.1
Branches
Unknown
Tags
Unknown