[FFmpeg-devel] [PATCH v5] avformat/udp: return the error code instead of generic EIO
Marton Balint
cus at passwd.hu
Sun Jan 10 21:29:30 EET 2021
On Sun, 10 Jan 2021, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
>
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
> libavformat/udp.c | 55 +++++++++++++++++++++++++++++++++----------------------
> 1 file changed, 33 insertions(+), 22 deletions(-)
[...]
> @@ -888,8 +901,6 @@ static int udp_open(URLContext *h, const char *uri, int flags)
> }
>
> if ((!is_output && s->circular_buffer_size) || (is_output && s->bitrate && s->circular_buffer_size)) {
> - int ret;
> -
> /* start the task going */
> s->fifo = av_fifo_alloc(s->circular_buffer_size);
> ret = pthread_mutex_init(&s->mutex, NULL);
This ret (and some others later in the code) are not an AVERROR(), you
should convert it to AVERROR() before returning.
Regards,
Marton
More information about the ffmpeg-devel
mailing list