CefResourceHandler seems to receive invalid Skip command

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CefResourceHandler seems to receive invalid Skip command

Postby NickChapman » Wed Aug 24, 2022 9:44 pm

Hi All,
I have implemented a custom resource handler, in order to serve video files to an embedded offscreen browser.

I have hit an issue with an embedded video that loops.

When chromium gets to the end of the video and starts playing it again, it re-requests the video (for some reason).
This is all well and good, except it results in a Skip() call before it starts reading from the start of the video file again.
After processing the Skip call, it seems to silently encounter an error processing the video file and the video stops playing.

If I hack out the Skip, by not actually skipping data, but just reporting that I skipped data, then the video replays properly.

This leads me to suspect the Skip call is a bug.

This only happens on one video I have seen so far.
Here's a log of the CefResourceHandler calls:

Code: Select all
Reading up to 65536 B, getReadIndex: 51052544
Reading up to 65536 B, getReadIndex: 51118080
Reading up to 65536 B, getReadIndex: 51183616
Reading up to 32947 B, getReadIndex: 51216205

47.79:------------------AnimatedTexResourceHandler::Open(): URL: http://resource/OP___Project___Ra_mp4_13111190299329526867_mp4_13111190299329526867.mp4------------------
path: C:\Users\xxxx\AppData\Roaming\Cyberspace/resources/OP___Project___Ra_mp4_13111190299329526867_mp4_13111190299329526867.mp4
Skipping 32768 B...
Reading up to 65536 B, getReadIndex: 0
Reading up to 1024 B, getReadIndex: 65536
Reading up to 64512 B, getReadIndex: 66560
Reading up to 1024 B, getReadIndex: 131072
Reading up to 64512 B, getReadIndex: 132096
Reading up to 1024 B, getReadIndex: 196608
Reading up to 64512 B, getReadIndex: 197632
Reading up to 1024 B, getReadIndex: 262144
Reading up to 64512 B, getReadIndex: 263168
Reading up to 1024 B, getReadIndex: 327680


So what you can see here is that chromium reaches the end of the video (~50 MB), then calls Open() again, but then makes a seemingly erroneous Skip() call of 32768 B.

Thoughts?
NickChapman
Techie
 
Posts: 21
Joined: Sun Apr 24, 2022 2:42 am

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 212 guests