[FFmpeg-cvslog] avfilter: fix segfault with setsar/dar

Michael Niedermayer git at videolan.org
Wed Feb 20 12:45:30 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Feb 20 12:34:05 2013 +0100| [951d39fecd1f6c6e7de63c5835e6776b0de27511] | committer: Michael Niedermayer

avfilter: fix segfault with setsar/dar

Reported-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavfilter/vf_aspect.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index 7869d22..8e19162 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -59,7 +59,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, const AVClass *c
     aspect->class = class;
     av_opt_set_defaults(aspect);
 
-    if (sscanf(args, "%d:%d%c", &q.num, &q.den, &c) == 2) {
+    if (args && sscanf(args, "%d:%d%c", &q.num, &q.den, &c) == 2) {
         aspect->ratio_str = av_strdup(args);
         av_log(ctx, AV_LOG_WARNING,
                "num:den syntax is deprecated, please use num/den or named options instead\n");



More information about the ffmpeg-cvslog mailing list