From 4b7fe8911a55aa7e754d96cf2f5417ba28168bf9 Mon Sep 17 00:00:00 2001 From: Daniel Flores Date: Thu, 20 Nov 2025 15:20:15 -0500 Subject: [PATCH] initialize streamIndex, mediaType --- src/torchcodec/_core/Metadata.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/torchcodec/_core/Metadata.h b/src/torchcodec/_core/Metadata.h index 0de633c2d..afa333dc2 100644 --- a/src/torchcodec/_core/Metadata.h +++ b/src/torchcodec/_core/Metadata.h @@ -22,11 +22,11 @@ enum class SeekMode { exact, approximate, custom_frame_mappings }; struct StreamMetadata { // Common (video and audio) fields derived from the AVStream. - int streamIndex; + int streamIndex = -1; // See this link for what various values are available: // https://ffmpeg.org/doxygen/trunk/group__lavu__misc.html#ga9a84bba4713dfced21a1a56163be1f48 - AVMediaType mediaType; + AVMediaType mediaType = AVMEDIA_TYPE_UNKNOWN; std::optional codecId; std::optional codecName;