[FFmpeg-devel] [PATCH 3/3] udp: Actually fail when we're missing required options, like the "warning" says.

Derek Buitenhuis derek.buitenhuis at gmail.com
Wed Nov 22 17:28:42 EET 2017


Signed-off-by: Derek Buitenhuis <derekb at vimeo.com>
---
There was no reasoning in the commit that added this, so maybe someone on
the list has some insights.
---
 libavformat/udp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/udp.c b/libavformat/udp.c
index 7bbd282..6319655 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -963,8 +963,8 @@ static int udp_open(URLContext *h, const char *uri, int flags)
     */
 
     if (is_output && s->bitrate && !s->circular_buffer_size) {
-        /* Warn user in case of 'circular_buffer_size' is not set */
-        av_log(h, AV_LOG_WARNING,"'bitrate' option was set but 'circular_buffer_size' is not, but required\n");
+        av_log(h, AV_LOG_ERROR,"'bitrate' option was set but 'circular_buffer_size' is not, but required\n");
+        goto fail;
     }
 
     if ((!is_output && s->circular_buffer_size) || (is_output && s->bitrate && s->circular_buffer_size)) {
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list