xiph / rav1e

The fastest and safest AV1 encoder.
BSD 2-Clause "Simplified" License
3.73k stars 253 forks source link

Prevent passing Frames with the wrong dimensions and/or chroma sampling #2461

Open lu-zero opened 4 years ago

lu-zero commented 4 years ago

As in the code snippet from #2460 we do not validate that the frame provided has the correct dimensions since we assume the user uses Context::new_frame() to create a new frame with the correct settings.

In order to add validation we either need to store the configuration in the Frame.

Urhengulas commented 4 years ago

I'd like to take this on, also because I'd like access to the configuration for the jsapi.