[FFmpeg-cvslog] r21176 - trunk/libavfilter/avfiltergraph.c

stefano subversion
Wed Jan 13 01:09:24 CET 2010


Author: stefano
Date: Wed Jan 13 01:09:24 2010
New Revision: 21176

Log:
Make query_formats() print an error message if an auto-inserted scale
filter cannot convert between input and output formats.

Modified:
   trunk/libavfilter/avfiltergraph.c

Modified: trunk/libavfilter/avfiltergraph.c
==============================================================================
--- trunk/libavfilter/avfiltergraph.c	Wed Jan 13 00:02:07 2010	(r21175)
+++ trunk/libavfilter/avfiltergraph.c	Wed Jan 13 01:09:24 2010	(r21176)
@@ -147,11 +147,15 @@ static int query_formats(AVFilterGraph *
                         return -1;
 
                     scale->filter->query_formats(scale);
-                    if(!avfilter_merge_formats(scale-> inputs[0]->in_formats,
-                                               scale-> inputs[0]->out_formats)||
-                       !avfilter_merge_formats(scale->outputs[0]->in_formats,
-                                               scale->outputs[0]->out_formats))
+                    if (((link = scale-> inputs[0]) &&
+                         !avfilter_merge_formats(link->in_formats, link->out_formats)) ||
+                        ((link = scale->outputs[0]) &&
+                         !avfilter_merge_formats(link->in_formats, link->out_formats))) {
+                        av_log(log_ctx, AV_LOG_ERROR,
+                               "Impossible to convert between the formats supported by the filter "
+                               "'%s' and the filter '%s'\n", link->src->name, link->dst->name);
                         return -1;
+                    }
                 }
             }
         }



More information about the ffmpeg-cvslog mailing list