[FFmpeg-cvslog] avfilter/af_sofalizer: check if filename was set.

Paul B Mahol git at videolan.org
Fri Mar 4 22:18:35 CET 2016


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Mar  4 22:14:43 2016 +0100| [781195fa6229fbeea81e134eb84d7ba6effdb9b9] | committer: Paul B Mahol

avfilter/af_sofalizer: check if filename was set.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=781195fa6229fbeea81e134eb84d7ba6effdb9b9
---

 libavfilter/af_sofalizer.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c
index 4c7ea68..2d18b7f 100644
--- a/libavfilter/af_sofalizer.c
+++ b/libavfilter/af_sofalizer.c
@@ -937,6 +937,11 @@ static av_cold int init(AVFilterContext *ctx)
     SOFAlizerContext *s = ctx->priv;
     int ret;
 
+    if (!s->filename) {
+        av_log(ctx, AV_LOG_ERROR, "Valid SOFA filename must be set.\n");
+        return AVERROR(EINVAL);
+    }
+
     /* load SOFA file, */
     /* initialize file IDs to 0 before attempting to load SOFA files,
      * this assures that in case of error, only the memory of already



More information about the ffmpeg-cvslog mailing list