fix for build errors with FFMpeg version 6 (#489)

* fix for build errors with FFMpeg version 6

* set initialize for reconfigure

[ROCm/rocdecode commit: f02751900d]
This commit is contained in:
Rajy Rawther
2025-01-08 13:26:08 -08:00
committed by GitHub
parent 9d96ca1354
commit 75add792ab
2 changed files with 8 additions and 2 deletions
@@ -214,6 +214,7 @@ class FFMpegVideoDecoder: public RocVideoDecoder {
typedef enum { STATUS_SUCCESS = 0, STATUS_FAILURE = -1 } StatusType;
bool no_multithreading_ = false;
bool b_decoder_initialized = false;
uint32_t av_frame_cnt_ = 0;
uint32_t av_pkt_cnt_ = 0;
RocdecSourceDataPacket last_packet_;
@@ -230,7 +231,11 @@ class FFMpegVideoDecoder: public RocVideoDecoder {
// Variables for FFMpeg decoding
AVCodecContext * dec_context_ = nullptr;
AVPixelFormat decoder_pixel_format_;
#if USE_AVCODEC_GREATER_THAN_58_134
const AVCodec *_decoder = nullptr;
#else
AVCodec *decoder_ = nullptr;
#endif
AVFormatContext * formatContext = nullptr;
AVInputFormat * inputFormat = nullptr;
AVStream *video = nullptr;