MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / rtmpe_read

Function rtmpe_read

libavformat/rtmpcrypt.c:277–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277static int rtmpe_read(URLContext *h, uint8_t *buf, int size)
278{
279 RTMPEContext *rt = h->priv_data;
280 int ret;
281
282 rt->stream->flags |= h->flags & AVIO_FLAG_NONBLOCK;
283 ret = ffurl_read(rt->stream, buf, size);
284 rt->stream->flags &= ~AVIO_FLAG_NONBLOCK;
285
286 if (ret < 0 && ret != AVERROR_EOF)
287 return ret;
288
289 if (rt->handshaked && ret > 0) {
290 /* decrypt data received by the server */
291 av_rc4_crypt(&rt->key_in, buf, buf, ret, NULL, 1);
292 }
293
294 return ret;
295}
296
297static int rtmpe_write(URLContext *h, const uint8_t *buf, int size)
298{

Callers

nothing calls this directly

Calls 2

ffurl_readFunction · 0.85
av_rc4_cryptFunction · 0.85

Tested by

no test coverage detected