[FFmpeg-cvslog] lavfi/vf_transpose: use standard options parsing.

Nicolas George git at videolan.org
Wed Mar 20 21:55:47 CET 2013


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sat Mar 16 21:27:48 2013 +0100| [769cc300723c19867e9bfe41a0782e35babc031c] | committer: Nicolas George

lavfi/vf_transpose: use standard options parsing.

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

 libavfilter/vf_transpose.c |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c
index aafb44e..ed87017 100644
--- a/libavfilter/vf_transpose.c
+++ b/libavfilter/vf_transpose.c
@@ -73,17 +73,6 @@ static const AVOption transpose_options[] = {
 
 AVFILTER_DEFINE_CLASS(transpose);
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
-{
-    TransContext *trans = ctx->priv;
-    const char *shorthand[] = { "dir", "passthrough", NULL };
-
-    trans->class = &transpose_class;
-    av_opt_set_defaults(trans);
-
-    return av_opt_set_from_string(trans, args, shorthand, "=", ":");
-}
-
 static int query_formats(AVFilterContext *ctx)
 {
     AVFilterFormats *pix_fmts = NULL;
@@ -266,11 +255,12 @@ static const AVFilterPad avfilter_vf_transpose_outputs[] = {
     { NULL }
 };
 
+static const char *const shorthand[] = { "dir", "passthrough", NULL };
+
 AVFilter avfilter_vf_transpose = {
     .name      = "transpose",
     .description = NULL_IF_CONFIG_SMALL("Transpose input video."),
 
-    .init = init,
     .priv_size = sizeof(TransContext),
 
     .query_formats = query_formats,
@@ -278,4 +268,5 @@ AVFilter avfilter_vf_transpose = {
     .inputs    = avfilter_vf_transpose_inputs,
     .outputs   = avfilter_vf_transpose_outputs,
     .priv_class = &transpose_class,
+    .shorthand = shorthand,
 };



More information about the ffmpeg-cvslog mailing list