fixed build issues with FFMpeg AVCodec version >=59 changes (#636)

* fixed build issues with FFMpeg AVCodec version >=59 changes

* fixed mistake of pushing stashed change

---------

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
This commit is contained in:
Rajy Rawther
2025-08-28 09:28:12 -07:00
committed by GitHub
parent eeecc3e8c8
commit 253e604c7b
2 changed files with 9 additions and 1 deletions
@@ -387,7 +387,11 @@ rocDecStatus AvcodecVideoDecoder::NotifyNewSequence(AVFrame *p_frame) {
p_video_format->frame_rate.denominator = dec_context_->framerate.den;
p_video_format->bit_depth_luma_minus8 = BitDepthFromPixelFormat(dec_context_->pix_fmt) - 8;
p_video_format->bit_depth_chroma_minus8 = p_video_format->bit_depth_luma_minus8;
p_video_format->progressive_sequence = !p_frame->interlaced_frame;
#if USE_AVCODEC_GREATER_THAN_58_134
p_video_format->progressive_sequence = !(p_frame->flags & AV_FRAME_FLAG_INTERLACED);
#else
p_video_format->progressive_sequence = !!p_frame->interlaced_frame;;
#endif
//number of decode surfaces are internal and not exposed in avcodec based decoding. Setting some value for sanity
p_video_format->min_num_decode_surfaces = dec_frames_.size();
p_video_format->coded_width = p_frame->linesize[0];