-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove streamType
field from DecodedOutput
#457
Conversation
frameFormat, | ||
expectedOutputWidth, | ||
expectedOutputHeight}; | ||
// We need to compare the current frame context with our previous frame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff looks bigger than it actually is because this block got indented to the left.
@@ -869,7 +869,6 @@ VideoDecoder::DecodedOutput VideoDecoder::convertAVFrameToDecodedOutput( | |||
AVFrame* frame = rawOutput.frame.get(); | |||
output.streamIndex = streamIndex; | |||
auto& streamInfo = streams_[streamIndex]; | |||
output.streamType = streams_[streamIndex].stream->codecpar->codec_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think there is some value in doing a TORCH_CHECK(streamInfo.stream->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
here or close by to make our assumptions explicit.
We pretend to support other types than
AVMEDIA_TYPE_VIDEO
with this field, but this is a lie. We have strong baked-in assumptions everywhere that we currently only support video frames. The main indicator is that we don't allow to add a stream that's not a video stream.Since we'll be tackling audio support soon, I think it's best to remove any relics from the past, since the code-base has evolved in ways that may now be incompatible with how we projected things at the time. Or, said differently, we don't want our design of audio support to be influenced by code we wrote 6 months ago.