[FFmpeg-cvslog] lavfi/frei0r: use AV_OPT_TYPE_IMAGE_SIZE

Paul B Mahol git at videolan.org
Fri Jul 26 19:17:31 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jul 26 17:16:26 2013 +0000| [be7d6710b45c629dc526821aee6b97b5aad6fd6f] | committer: Paul B Mahol

lavfi/frei0r: use AV_OPT_TYPE_IMAGE_SIZE

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

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

 libavfilter/vf_frei0r.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index 27d5a26..0278441 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -67,7 +67,6 @@ typedef struct Frei0rContext {
 
     char *dl_name;
     char *params;
-    char *size;
     AVRational framerate;
 
     /* only used by the source */
@@ -456,11 +455,6 @@ static av_cold int source_init(AVFilterContext *ctx)
 {
     Frei0rContext *s = ctx->priv;
 
-    if (av_parse_video_size(&s->w, &s->h, s->size) < 0) {
-        av_log(ctx, AV_LOG_ERROR, "Invalid frame size: '%s'\n", s->size);
-        return AVERROR(EINVAL);
-    }
-
     s->time_base.num = s->framerate.den;
     s->time_base.den = s->framerate.num;
 
@@ -507,7 +501,7 @@ static int source_request_frame(AVFilterLink *outlink)
 }
 
 static const AVOption frei0r_src_options[] = {
-    { "size",          "Dimensions of the generated video.", OFFSET(size),      AV_OPT_TYPE_STRING, { .str = "" },   .flags = FLAGS },
+    { "size",          "Dimensions of the generated video.", OFFSET(w),         AV_OPT_TYPE_IMAGE_SIZE, { .str = "320x240" }, .flags = FLAGS },
     { "framerate",     NULL,                                 OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, { .str = "25" }, .flags = FLAGS },
     { "filter_name",   NULL,                                 OFFSET(dl_name),   AV_OPT_TYPE_STRING,                  .flags = FLAGS },
     { "filter_params", NULL,                                 OFFSET(params),    AV_OPT_TYPE_STRING,                  .flags = FLAGS },



More information about the ffmpeg-cvslog mailing list