[FFmpeg-devel] [fix-multiple-filter-chain.patch PATCH 2/2] Cosmetics: rename out_video_filter to output_video_filter, for consistency with input_video_filter.

Stefano Sabatini stefano.sabatini-lala
Wed Jul 7 13:22:02 CEST 2010


---
 ffmpeg.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index d734cdf..c0664b0 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -308,7 +308,7 @@ typedef struct AVInputStream {
     int showed_multi_packet_warning;
     int is_past_recording_time;
 #if CONFIG_AVFILTER
-    AVFilterContext *out_video_filter;
+    AVFilterContext *output_video_filter;
     AVFilterContext *input_video_filter;
     AVFrame *filter_frame;
     int has_filter_frame;
@@ -412,19 +412,19 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost)
 
     if (!(ist->input_video_filter = avfilter_open(avfilter_get_by_name("buffer"), "src")))
         return AVERROR(EINVAL);
-    if (!(ist->out_video_filter = avfilter_open(&output_filter, "out")))
+    if (!(ist->output_video_filter = avfilter_open(&output_filter, "out")))
         return AVERROR(EINVAL);
 
     snprintf(args, 255, "%d:%d:%d", ist->st->codec->width,
              ist->st->codec->height, ist->st->codec->pix_fmt);
     if ((ret = avfilter_init_filter(ist->input_video_filter, args, NULL)) < 0)
         return ret;
-    if ((ret = avfilter_init_filter(ist->out_video_filter, NULL, &codec->pix_fmt)) < 0)
+    if ((ret = avfilter_init_filter(ist->output_video_filter, NULL, &codec->pix_fmt)) < 0)
         return ret;
 
     /* add input and output filters to the overall graph */
     avfilter_graph_add_filter(graph, ist->input_video_filter);
-    avfilter_graph_add_filter(graph, ist->out_video_filter);
+    avfilter_graph_add_filter(graph, ist->output_video_filter);
 
     last_filter = ist->input_video_filter;
 
@@ -474,7 +474,7 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost)
         outputs->next    = NULL;
 
         inputs->name    = av_strdup("out");
-        inputs->filter  = ist->out_video_filter;
+        inputs->filter  = ist->output_video_filter;
         inputs->pad_idx = 0;
         inputs->next    = NULL;
 
@@ -482,7 +482,7 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost)
             return ret;
         av_freep(&vfilters);
     } else {
-        if ((ret = avfilter_link(last_filter, 0, ist->out_video_filter, 0)) < 0)
+        if ((ret = avfilter_link(last_filter, 0, ist->output_video_filter, 0)) < 0)
             return ret;
     }
 
@@ -494,8 +494,8 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost)
     if ((ret = avfilter_graph_config_links(graph, NULL)) < 0)
         return ret;
 
-    codec->width = ist->out_video_filter->inputs[0]->w;
-    codec->height = ist->out_video_filter->inputs[0]->h;
+    codec->width = ist->output_video_filter->inputs[0]->w;
+    codec->height = ist->output_video_filter->inputs[0]->h;
 
     return 0;
 }
@@ -1676,15 +1676,15 @@ static int output_packet(AVInputStream *ist, int ist_index,
         }
 #if CONFIG_AVFILTER
         frame_available = ist->st->codec->codec_type != AVMEDIA_TYPE_VIDEO ||
-            !ist->out_video_filter || avfilter_poll_frame(ist->out_video_filter->inputs[0]);
+            !ist->output_video_filter || avfilter_poll_frame(ist->output_video_filter->inputs[0]);
 #endif
         /* if output time reached then transcode raw format,
            encode packets and output them */
         if (start_time == 0 || ist->pts >= start_time)
 #if CONFIG_AVFILTER
         while (frame_available) {
-            if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ist->out_video_filter)
-                get_filtered_video_pic(ist->out_video_filter, &ist->picref, &picture, &ist->pts);
+            if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ist->output_video_filter)
+                get_filtered_video_pic(ist->output_video_filter, &ist->picref, &picture, &ist->pts);
 #endif
             for(i=0;i<nb_ostreams;i++) {
                 int frame_size;
@@ -1778,7 +1778,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
 
 #if CONFIG_AVFILTER
             frame_available = (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) &&
-                              ist->out_video_filter && avfilter_poll_frame(ist->out_video_filter->inputs[0]);
+                              ist->output_video_filter && avfilter_poll_frame(ist->output_video_filter->inputs[0]);
             if(ist->picref)
                 avfilter_unref_pic(ist->picref);
         }
-- 
1.7.1




More information about the ffmpeg-devel mailing list