cros-codecs icon indicating copy to clipboard operation
cros-codecs copied to clipboard

decoder/stateless: `parser` should be moved outside of the decoder state struct

Open Gnurou opened this issue 1 year ago • 0 comments

We often perform mutable calls to the state while holding a non-mutable reference to the parser (e.g. to pass SPS information). This is currently not allowed because the parser is part of the state.

Every decoder has both a parser and a state though, so if we move the parser out of the state structure and make it another type parameter of StatelessCodec, we should be able to perform these calls avoid save a few redundant calls to fetch the same data.

Gnurou avatar Jul 11 '24 03:07 Gnurou