Merge commit '00d7369de06a16f7c8770a899fcb16bcb94b1e20'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 22 Oct 2013 17:26:39 +0000 (19:26 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 22 Oct 2013 17:26:42 +0000 (19:26 +0200)
* commit '00d7369de06a16f7c8770a899fcb16bcb94b1e20':
  vf_fieldorder: log when processing is skipped

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavfilter/vf_fieldorder.c

@@@ -79,25 -97,18 +79,30 @@@ static int filter_frame(AVFilterLink *i
      AVFilterContext   *ctx     = inlink->dst;
      FieldOrderContext *s       = ctx->priv;
      AVFilterLink      *outlink = ctx->outputs[0];
 -    int h, plane, line_step, line_size, line;
 -    uint8_t *data;
 +    int h, plane, src_line_step, dst_line_step, line_size, line;
 +    uint8_t *dst, *src;
 +    AVFrame *out;
  
      if (!frame->interlaced_frame ||
-         frame->top_field_first == s->dst_tff)
+         frame->top_field_first == s->dst_tff) {
+         av_log(ctx, AV_LOG_VERBOSE,
+                "Skipping %s.\n",
+                frame->interlaced_frame ?
+                "frame with same field order" : "progressive frame");
          return ff_filter_frame(outlink, frame);
+     }
  
 +    if (av_frame_is_writable(frame)) {
 +        out = frame;
 +    } else {
 +        out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
 +        if (!out) {
 +            av_frame_free(&frame);
 +            return AVERROR(ENOMEM);
 +        }
 +        av_frame_copy_props(out, frame);
 +    }
 +
      av_dlog(ctx,
              "picture will move %s one line\n",
              s->dst_tff ? "up" : "down");