From 2145992a4d1e25aa58b551fb5567034289ea5d13 Mon Sep 17 00:00:00 2001 From: jeffqjiangNew <142832361+jeffqjiangNew@users.noreply.github.com> Date: Tue, 3 Jun 2025 10:49:28 -0400 Subject: [PATCH] * FFMPEG SW decode: Replaced the assert against 0 display width with an error check, to avoid abortion in a query call. (#596) * * FFMPEG SW decode: Replaced the assert against 0 display width with an error check, to avoid abortion in a query call. * * FFMPEG SW decode: Correction to the previous editing error. --------- Co-authored-by: essamROCm <77812857+essamROCm@users.noreply.github.com> [ROCm/rocdecode commit: 0f89c9c17c3944d5359b6adb8cd7b5dfedc6501a] --- projects/rocdecode/utils/ffmpegvideodecode/ffmpeg_video_dec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocdecode/utils/ffmpegvideodecode/ffmpeg_video_dec.h b/projects/rocdecode/utils/ffmpegvideodecode/ffmpeg_video_dec.h index 8a0e466be8..b524d3fdb0 100644 --- a/projects/rocdecode/utils/ffmpegvideodecode/ffmpeg_video_dec.h +++ b/projects/rocdecode/utils/ffmpegvideodecode/ffmpeg_video_dec.h @@ -120,7 +120,7 @@ class FFMpegVideoDecoder: public RocVideoDecoder { /** * @brief This function is used to get the current frame size based on pixel format. */ - virtual int GetFrameSize() { assert(disp_width_); return ((disp_width_ * disp_height_) + ((chroma_height_ * chroma_width_) * num_chroma_planes_)) * byte_per_pixel_; } + virtual int GetFrameSize() {CHECK_ZERO("Display width", disp_width_); return ((disp_width_ * disp_height_) + ((chroma_height_ * chroma_width_) * num_chroma_planes_)) * byte_per_pixel_; } private: /**