From 1e14f1e2ef1b1eb1994908d7fe839e5e2893b799 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Thu, 6 Jul 2023 18:31:07 +0200 Subject: [PATCH] videoplayer: do not print missing reference error --- videoplayer/src/videodec.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/videoplayer/src/videodec.rs b/videoplayer/src/videodec.rs index 1d70112..6965ae5 100644 --- a/videoplayer/src/videodec.rs +++ b/videoplayer/src/videodec.rs @@ -113,7 +113,9 @@ impl VideoDecoder { }, (Err(err), id) => { reord.drop_frame(id); - println!("frame {} decoding error {:?}", id, err); + if err != DecoderError::MissingReference { + println!("frame {} decoding error {:?}", id, err); + } }, }; } @@ -159,7 +161,9 @@ impl VideoDecoder { }, (Err(err), id) => { reord.drop_frame(id); - println!("frame {} decoding error {:?}", id, err); + if err != DecoderError::MissingReference { + println!("frame {} decoding error {:?}", id, err); + } }, }; } @@ -171,7 +175,9 @@ impl VideoDecoder { (Err(DecoderError::NoFrame), _) => {}, (Err(err), id) => { reord.drop_frame(id); - println!("frame {} decoding error {:?}", id, err); + if err != DecoderError::MissingReference { + println!("frame {} decoding error {:?}", id, err); + } }, }; } -- 2.39.5