[FFmpeg-devel] [PATCH 2/4] lavfi/fieldorder: use av_image_fill_linesizes()

Paul B Mahol onemda at gmail.com
Fri Sep 6 16:45:29 CEST 2013


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavfilter/vf_fieldorder.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index 16310ce..7afdf9f 100644
--- a/libavfilter/vf_fieldorder.c
+++ b/libavfilter/vf_fieldorder.c
@@ -70,16 +70,8 @@ static int config_input(AVFilterLink *inlink)
 {
     AVFilterContext   *ctx = inlink->dst;
     FieldOrderContext *s   = ctx->priv;
-    int               plane;
 
-    /** full an array with the number of bytes that the video
-     *  data occupies per line for each plane of the input video */
-    for (plane = 0; plane < 4; plane++) {
-        s->line_size[plane] = av_image_get_linesize(inlink->format, inlink->w,
-                                                    plane);
-    }
-
-    return 0;
+    return av_image_fill_linesizes(s->line_size, inlink->format, inlink->w);
 }
 
 static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list