[FFmpeg-devel] [PATCH] TLS OPENSSL SSL_get_error

LANGLOIS Olivier PIS -EXT olivier.pis.langlois at transport.alstom.com
Wed Aug 28 16:43:23 CEST 2013

> -----Original Message-----
> From: ffmpeg-devel-bounces at ffmpeg.org [mailto:ffmpeg-devel-
> bounces at ffmpeg.org] On Behalf Of Mirko Puliafito
> Sent: Wednesday, August 28, 2013 10:37 AM
> To: FFmpeg development discussions and patches
> Subject: Re: [FFmpeg-devel] [PATCH] TLS OPENSSL SSL_get_error
> Yes but, I was wondering which would be the generic handling.
> Any Idea? EAGAIN?

I'm really nit picking. Your proposal is close to be perfect to my eyes.

If you were just modifying

if(errno == EAGAIN)


if (ret == SSL_ERROR_SYSCALL && errno == EAGAIN)

that would protect you against the case where errno has not been set by the very last SSL API call.


av_log(h, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL));  return AVERROR(EIO);

is excellent generic error handling if caller code consider EIO error as non-recoverable.

CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.

More information about the ffmpeg-devel mailing list