Closed wrv closed 6 months ago
This arises from mistakenly sharing a single ParamSetId
type between seq_parameter_set_rbsp()
and pic_parameter_set_rbsp()
syntax. Will need to break this into two separate Id types.
Is there a need for a video in which this gets triggered? I can provide one.
@astraw yes please - I would be happy to add a real PPS as a unit test
Here is an MP4 file containing an h264 video track that triggers the issue for me. (I moved my .h264 file into an .mp4 file with ffmpeg -i movie20221006_115500.885150194-issue56.h264 -vcodec copy movie20221006_115500.885150194-issue56.mp4
because github didn't accept an .h264 upload. I verified the .h264 file extracted with ffmpeg -i movie20221006_115500.885150194-issue56.mp4 -vcodec copy extract.h264
still triggers the issue for me.)
The
pic_parameter_set_id
is a ParamSetId struct, which checks if the ID is within [0, 31]: https://github.com/dholroyd/h264-reader/blob/master/src/nal/pps.rs#L218Valid bitstreams can have
pic_parameter_set_id
s in the range [0, 255].