]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_scale_qsv.c
Merge commit 'e05e5920a4e1f1f15cc8a7c843159d519f6ec18e'
[ffmpeg] / libavfilter / vf_scale_qsv.c
index e9bfff867d891285951e8a0a871af9d3e5bdccb8..7d593b2b211ea50a9cf65c220c9f10bee9c03ed8 100644 (file)
@@ -1,18 +1,18 @@
 /*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
  *
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -152,8 +152,10 @@ static int qsvscale_query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_QSV, AV_PIX_FMT_NONE,
     };
     AVFilterFormats *pix_fmts  = ff_make_format_list(pixel_formats);
+    int ret;
 
-    ff_set_common_formats(ctx, pix_fmts);
+    if ((ret = ff_set_common_formats(ctx, pix_fmts)) < 0)
+        return ret;
 
     return 0;
 }
@@ -587,7 +589,7 @@ fail:
 }
 
 #define OFFSET(x) offsetof(QSVScaleContext, x)
-#define FLAGS AV_OPT_FLAG_VIDEO_PARAM
+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 static const AVOption options[] = {
     { "w",      "Output video width",  OFFSET(w_expr),     AV_OPT_TYPE_STRING, { .str = "iw"   }, .flags = FLAGS },
     { "h",      "Output video height", OFFSET(h_expr),     AV_OPT_TYPE_STRING, { .str = "ih"   }, .flags = FLAGS },