videoplayer: do not print missing reference error
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 6 Jul 2023 16:31:07 +0000 (18:31 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 6 Jul 2023 16:31:07 +0000 (18:31 +0200)
videoplayer/src/videodec.rs

index 1d70112902d0f0a12f44f3666de94d3e8374f995..6965ae5ef63e1d822e1e97fb1c17dae271b03896 100644 (file)
@@ -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);
+                            }
                         },
                     };
                 }