<div dir="ltr"><div dir="ltr">Hi all,<div><br></div><div>we're using libav* binded to custom IO, so it's possible to use our http client instead of libav* one. I've noticed that application is not even trying to decrypt HLS + AES* chunks and fails with exception "Error when loading first segment". The loop:</div><div>1. Bind io_open, io_close, seek, read functions to our custom ones;</div><div>2. When executed, playlist is parsed, "iv" and "key" values are stored in libav* options/dictionary;</div><div><div>3. After creating new IO context for 1st segment, Read callback is called multiple times and we are filling buffer with bytes received from http server (encrypted bytes);</div><div>4. After few loops, exception "Error when loading first segment" is thrown.</div><div><br></div><div>It seems that app has to make an explicit call to crypto module in Read callback, or decrypt chunks itself before filling the buffer in Read callback. Which scenario would you recommend?</div><div><br></div><div>Tried with ffmpeg versions 3.4.2 and 4.0.1. We're using javacpp presets to communicate with libav. Our app works with unencrypted hls fine.</div><div><br></div><div>Any help is appreciated.<br></div><div><br></div><div><br></div>-- </div><div>Regards,<br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-size:12.8px">Arminas</span><br></div></div></div></div></div></div></div></div>