naudio / NLayer

MPEG 1 & 2 Decoder for Layers 1, 2, & 3
MIT License
123 stars 30 forks source link

MpegStreamReader: fix NPE in SeekTo #13

Closed basisbit closed 4 years ago

basisbit commented 4 years ago

After last frame was read by MpegStreamReader.NextFrame, any SeekTo(frameNumber) failed because of a NullPointerException for accessing _current. Fixed by adding a null check so that _current will be set correctly to the desired frame.