[FFmpeg-devel] [PATCH v5] avformat/udp: return the error code instead of generic EIO
lance.lmwang at gmail.com
lance.lmwang at gmail.com
Mon Jan 11 01:36:13 EET 2021
On Sun, Jan 10, 2021 at 08:29:30PM +0100, Marton Balint wrote:
>
>
> 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.
OK, will add below code before goto error for these condition, correct?
ret = AVERROR(ret);
>
> Regards,
> Marton
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
--
Thanks,
Limin Wang
More information about the ffmpeg-devel
mailing list