diff --git a/src/media/media_stream.h b/src/media/media_stream.h
index d5318692284f2c3c5a14d07e5a0a68076a6dd682..f64176134b6e79b290bcc4ac11f22c75a7e9a9c6 100644
--- a/src/media/media_stream.h
+++ b/src/media/media_stream.h
@@ -104,6 +104,18 @@ struct MediaStream {
             break;
         }
     }
+
+    MediaStream(const MediaStream& other) = default;
+
+    bool isValid() const
+    {
+        if (format < 0)
+            return false;
+        if (isVideo)
+            return width > 0 && height > 0;
+        else
+            return sampleRate > 0 && nbChannels > 0;
+    }
 };
 
 inline std::ostream& operator<<(std::ostream& os, const MediaStream& ms)