Skip to content

Commit 4b7fe89

Browse files
committed
initialize streamIndex, mediaType
1 parent 559b27e commit 4b7fe89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/torchcodec/_core/Metadata.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ enum class SeekMode { exact, approximate, custom_frame_mappings };
2222

2323
struct StreamMetadata {
2424
// Common (video and audio) fields derived from the AVStream.
25-
int streamIndex;
25+
int streamIndex = -1;
2626

2727
// See this link for what various values are available:
2828
// https://ffmpeg.org/doxygen/trunk/group__lavu__misc.html#ga9a84bba4713dfced21a1a56163be1f48
29-
AVMediaType mediaType;
29+
AVMediaType mediaType = AVMEDIA_TYPE_UNKNOWN;
3030

3131
std::optional<AVCodecID> codecId;
3232
std::optional<std::string> codecName;

0 commit comments

Comments
 (0)