Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 9897d1f

Browse files
luoying1234U1X6WK
authored andcommitted
Fix white flash issue on live mode. 1. Fix error assignment in correcting pts due to fifo over size [VCD-2858].
Signed-off-by: Luo, Ying <ying2.luo@intel.com>
1 parent d688cda commit 9897d1f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/player/player_lib/Decoder/VideoDecoder.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -540,14 +540,14 @@ RenderStatus VideoDecoder::GetFrame(uint64_t pts, DecodedFrame *&frame, int64_t
540540
max_frame_size = (mDecodeInfo.frameRate_num / mDecodeInfo.frameRate_den) * mDecodeInfo.segment_duration + 10;
541541
if (mDecCtx->get_size_of_frame() > max_frame_size && corr_pts != nullptr && !mDecCtx->bPacketEOS) {
542542
while (mDecCtx->get_size_of_frame() > max_frame_size / 2) {
543-
frame = mDecCtx->pop_frame();
544-
LOG(INFO)<<"Due to over size, drop frame pts is:" << frame->pts << " video id is:" << mVideoId<<endl;
545-
av_frame_free(&frame->av_frame);
546-
if (frame->rwpk)
547-
SAFE_DELETE_ARRAY(frame->rwpk->rectRegionPacking);
548-
SAFE_DELETE(frame->rwpk);
549-
SAFE_DELETE_ARRAY(frame->qtyResolution);
550-
SAFE_DELETE(frame);
543+
DecodedFrame *frame_d = mDecCtx->pop_frame();
544+
LOG(INFO)<<"Due to over size, drop frame pts is:" << frame_d->pts << " video id is:" << mVideoId<<endl;
545+
av_frame_free(&frame_d->av_frame);
546+
if (frame_d->rwpk)
547+
SAFE_DELETE_ARRAY(frame_d->rwpk->rectRegionPacking);
548+
SAFE_DELETE(frame_d->rwpk);
549+
SAFE_DELETE_ARRAY(frame_d->qtyResolution);
550+
SAFE_DELETE(frame_d);
551551
}
552552
*corr_pts = mDecCtx->get_front_of_frame()->pts;
553553
LOG(INFO) << "Correct pts is " << *corr_pts << endl;

0 commit comments

Comments
 (0)