Skip to content

Commit f969483

Browse files
committed
discard unusable images
1 parent b0d261c commit f969483

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ void *__FRAME_THREAD__(void *param)
348348
}
349349

350350
MppBuffer buffer = mpp_frame_get_buffer(frame);
351-
if (buffer) {
351+
if (buffer && !discard) {
352352
output_list->video_poc = mpp_frame_get_poc(frame);
353353
uint64_t feed_data_ts = mpp_frame_get_pts(frame);
354354

@@ -382,6 +382,8 @@ void *__FRAME_THREAD__(void *param)
382382
decoded_hor_stride,
383383
decoded_ver_stride, fmt);
384384
}
385+
} else {
386+
spdlog::warn("dropping frame (buffer={}, discard={})", buffer ? "ok" : "null", discard);
385387
}
386388
}
387389

0 commit comments

Comments
 (0)