shaka-player icon indicating copy to clipboard operation
shaka-player copied to clipboard

MEDIA.BUFFER_READ_OUT_OF_BOUNDS in cea_decoder parsing captions from h.265 content

Open TheJohnBowers opened this issue 3 years ago • 4 comments

Have you read the FAQ and checked for duplicate open issues? It is possibly related to https://github.com/google/shaka-player/issues/3634, but I am not sure. I can send some sample content which the others cannot provide. Not sure if the problem is with the content, or shaka. A couple of interesting things to note though 1 - There are no actual captions in the content until about 1 minute in, but the cea_parser error occurs at about 20 seconds into the content 2 - Exoplayer does not have any issues with the content.

What link can we use to reproduce this? I will send the content to your private address

What version of Shaka Player are you using? v3.2.0-uncompiled

What browser and OS are you using? Windows 10 - Edge - With HEVC decoder plugin

What did you do? Playback content

What did you expect to happen? Uninterrupted playback

What actually happened?

Attempting to buffer the 6th segment, this error occurs

Error: Shaka Error MEDIA.BUFFER_READ_OUT_OF_BOUNDS ()     at new shaka.util.Error (https://shaka-player-demo.appspot.com/lib/util/error.js:94:17)     at shaka.util.DataViewReader.outOfBounds_ (https://shaka-player-demo.appspot.com/lib/util/data_view_reader.js:267:12)     at shaka.util.DataViewReader.readUint8 (https://shaka-player-demo.appspot.com/lib/util/data_view_reader.js:83:18)     at shaka.cea.CeaDecoder.extract (https://shaka-player-demo.appspot.com/lib/cea/cea_decoder.js:120:16)     at shaka.media.ClosedCaptionParser.parseFrom (https://shaka-player-demo.appspot.com/lib/media/closed_caption_parser.js:89:24)     at shaka.media.MediaSourceEngine.appendBuffer (https://shaka-player-demo.appspot.com/lib/media/media_source_engine.js:547:52)     at shaka.media.StreamingEngine.append_ (https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:1571:51)     at async shaka.media.StreamingEngine.fetchAndAppend_ (https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:1261:9)

TheJohnBowers avatar Sep 23 '21 14:09 TheJohnBowers

Im also facing the same issue. Here is the error log:

Error: Shaka Error MEDIA.BUFFER_READ_OUT_OF_BOUNDS ()
    at new shaka.util.Error (http://localhost/shaka-player/lib/util/error.js:94:17)
    at shaka.util.DataViewReader.outOfBounds_ (http://localhost/shaka-player/lib/util/data_view_reader.js:267:12)
    at shaka.util.DataViewReader.skip (http://localhost/shaka-player/lib/util/data_view_reader.js:204:18)
    at shaka.cea.Mp4CeaParser.parseMdat_ (http://localhost/shaka-player/lib/cea/mp4_cea_parser.js:239:16)
    at http://localhost/shaka-player/lib/cea/mp4_cea_parser.js:186:16
    at shaka.util.Mp4Parser.parseNext (http://localhost/shaka-player/lib/util/mp4_parser.js:187:7)
    at shaka.util.Mp4Parser.parse (http://localhost/shaka-player/lib/util/mp4_parser.js:93:12)
    at shaka.cea.Mp4CeaParser.parse (http://localhost/shaka-player/lib/cea/mp4_cea_parser.js:190:10)
    at shaka.media.ClosedCaptionParser.parseFrom (http://localhost/shaka-player/lib/media/closed_caption_parser.js:83:44)
    at shaka.media.MediaSourceEngine.appendBuffer (http://localhost/shaka-player/lib/media/media_source_engine.js:547:52)

I checked the previous versions and it seems the last version with which it worked is 3.0.13. From version 3.1.0 and later "BUFFER_READ_OUT_OF_BOUNDS" occurs. The problem occurs on both firefox and chrome (on Ubuntu 18.04.5 LTS). Also playback works fine with latest dash.js.

Edit: Just noticed this bug was reported for h.265. I'm seeing this error for h.264 as well.

ashish157 avatar Sep 30 '21 11:09 ashish157

Could it be a duplicate of https://github.com/google/shaka-player/issues/3608? Have you tried the master branch to see if it happens?

Note: there are two commits possibly related to this: https://github.com/google/shaka-player/commit/97ba4dfd7bdcbf1b612af3679ee85273a1967715 and https://github.com/google/shaka-player/commit/6a775e29a4c96588822288188d8e34ea4c992713

avelad avatar Sep 30 '21 12:09 avelad

I just checked-out master, recompiled and can confirm it is happening with latest master.

ashish157 avatar Sep 30 '21 13:09 ashish157

Yes I just ran it against the nightly build from your appspot demo. I assume that is built from latest master. It is still happening there.

TheJohnBowers avatar Oct 01 '21 21:10 TheJohnBowers