Skip to content

Commit

Permalink
Remove unnecessary optionality
Browse files Browse the repository at this point in the history
  • Loading branch information
scotts committed Oct 16, 2024
1 parent f8cbb62 commit 4f35de4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/torchcodec/decoders/_core/VideoDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ VideoDecoder::RawDecodedOutput VideoDecoder::getNextRawDecodedOutputNoDemux() {
getDecodedOutputWithFilter([this](int frameStreamIndex, AVFrame* frame) {
StreamInfo& activeStream = streams_[frameStreamIndex];
return frame->pts >=
activeStream.discardFramesBeforePts.value_or(INT64_MIN);
activeStream.discardFramesBeforePts;
});
return rawOutput;
}
Expand Down
2 changes: 1 addition & 1 deletion src/torchcodec/decoders/_core/VideoDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ class VideoDecoder {
// The desired position of the cursor in the stream. We send frames >=
// this pts to the user when they request a frame.
// We set this field if the user requested a seek.
std::optional<int64_t> discardFramesBeforePts = 0;
int64_t discardFramesBeforePts = INT64_MIN;
VideoStreamDecoderOptions options;
// The filter state associated with this stream (for video streams). The
// actual graph will be nullptr for inactive streams.
Expand Down

0 comments on commit 4f35de4

Please sign in to comment.