On Sat, 9 Jan 2021, [email protected] wrote:
From: Limin Wang <[email protected]> Signed-off-by: Limin Wang <[email protected]> --- libavformat/udp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/udp.c b/libavformat/udp.c index 088e30c..a7fbb94 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -903,6 +903,10 @@ 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)) { /* start the task going */ s->fifo = av_fifo_alloc(s->circular_buffer_size); + if (!s->fifo) { + ret = AVERROR(ENOMEM); + goto fail; + } ret = pthread_mutex_init(&s->mutex, NULL); if (ret != 0) { av_log(h, AV_LOG_ERROR, "pthread_mutex_init failed : %s\n", strerror(ret));
LGTM, thanks. Marton _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
