diff --git a/projects/rocdecode/src/rocdecode-host/avcodec/avcodec_videodecoder.cpp b/projects/rocdecode/src/rocdecode-host/avcodec/avcodec_videodecoder.cpp index 9dfe161f21..2f08ce748e 100644 --- a/projects/rocdecode/src/rocdecode-host/avcodec/avcodec_videodecoder.cpp +++ b/projects/rocdecode/src/rocdecode-host/avcodec/avcodec_videodecoder.cpp @@ -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);