set min: number of decoded surfaces to non-zero value for ffmpeg based decoding (#627)

[ROCm/rocdecode commit: d9690d1715]
Tento commit je obsažen v:
Rajy Rawther
2025-08-08 07:11:10 -07:00
odevzdal GitHub
rodič c6bc0ed4a3
revize 966f338d96
+2 -1
Zobrazit soubor
@@ -388,7 +388,8 @@ rocDecStatus AvcodecVideoDecoder::NotifyNewSequence(AVFrame *p_frame) {
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;
p_video_format->min_num_decode_surfaces = dec_context_->delay + dec_context_->max_b_frames;
//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];
p_video_format->coded_height = p_frame->height;
p_video_format->chroma_format = AVPixelFormat2rocDecVideoChromaFormat(dec_context_->pix_fmt);