]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/avcodec.c
Makefile: disable compiling avconv by default.
[ffmpeg] / libavfilter / avcodec.c
index 50670bc55e8238c71635a98b00613b897d42a485..2010040d141bc052ec7698d8d24629bc74ceff2a 100644 (file)
@@ -53,3 +53,21 @@ AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame
     avfilter_copy_frame_props(picref, frame);
     return picref;
 }
+
+int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
+                                              const AVFilterBufferRef *picref)
+{
+    if (!picref || !picref->video || !frame)
+        return AVERROR(EINVAL);
+
+    memcpy(frame->data,     picref->data,     sizeof(frame->data));
+    memcpy(frame->linesize, picref->linesize, sizeof(frame->linesize));
+    frame->pkt_pos          = picref->pos;
+    frame->interlaced_frame = picref->video->interlaced;
+    frame->top_field_first  = picref->video->top_field_first;
+    frame->key_frame        = picref->video->key_frame;
+    frame->pict_type        = picref->video->pict_type;
+    frame->sample_aspect_ratio = picref->video->sample_aspect_ratio;
+
+    return 0;
+}