]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/lavfi.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavdevice / lavfi.c
index 070aff565cae35d9e616eb624e966cd8d1cc6ab3..4f1ba582e7120a8995ce7f48fb3917e8ad025c0e 100644 (file)
 #include "float.h"              /* DBL_MIN, DBL_MAX */
 
 #include "libavutil/bprint.h"
+#include "libavutil/channel_layout.h"
 #include "libavutil/file.h"
 #include "libavutil/log.h"
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "libavutil/parseutils.h"
 #include "libavutil/pixdesc.h"
-#include "libavutil/audioconvert.h"
 #include "libavfilter/avfilter.h"
 #include "libavfilter/avfiltergraph.h"
 #include "libavfilter/buffersink.h"
@@ -109,7 +109,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
     if (lavfi->graph_filename && lavfi->graph_str) {
         av_log(avctx, AV_LOG_ERROR,
                "Only one of the graph or graph_file options must be specified\n");
-        return AVERROR(EINVAL);
+        FAIL(AVERROR(EINVAL));
     }
 
     if (lavfi->graph_filename) {
@@ -118,13 +118,13 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
         ret = av_file_map(lavfi->graph_filename,
                           &file_buf, &file_bufsize, 0, avctx);
         if (ret < 0)
-            return ret;
+            goto end;
 
         /* create a 0-terminated string based on the read file */
         graph_buf = av_malloc(file_bufsize + 1);
         if (!graph_buf) {
             av_file_unmap(file_buf, file_bufsize);
-            return AVERROR(ENOMEM);
+            FAIL(AVERROR(ENOMEM));
         }
         memcpy(graph_buf, file_buf, file_bufsize);
         graph_buf[file_bufsize] = 0;