Re: [FFmpeg-devel] [PATCHv2] avfiltergraph.c: restore disabling of auto conversions

2016-08-10 Thread Burt P.
applied

On Wed, Aug 10, 2016 at 4:09 AM, Burt P  wrote:
> Restore a check added in 440af105f2306d3c7b3b3f4d7530bab910d49cb9
> but lost sometime after. avfilter_graph_set_auto_convert() will
> have an effect once again.
>
> Signed-off-by: Burt P 
> ---
>  libavfilter/avfiltergraph.c | 8 
>  1 file changed, 8 insertions(+)
>
> diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
> index 4275113..3af698d 100644
> --- a/libavfilter/avfiltergraph.c
> +++ b/libavfilter/avfiltergraph.c
> @@ -507,6 +507,14 @@ static int query_formats(AVFilterGraph *graph, AVClass 
> *log_ctx)
>  char scale_args[256];
>  char inst_name[30];
>
> +if (graph->disable_auto_convert) {
> +av_log(log_ctx, AV_LOG_ERROR,
> +   "The filters '%s' and '%s' do not have a common 
> format "
> +   "and automatic conversion is disabled.\n",
> +   link->src->name, link->dst->name);
> +return AVERROR(EINVAL);
> +}
> +
>  /* couldn't merge format lists. auto-insert conversion 
> filter */
>  switch (link->type) {
>  case AVMEDIA_TYPE_VIDEO:
> --
> 2.7.4
>



-- 
Burt
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCHv2] avfiltergraph.c: restore disabling of auto conversions

2016-08-10 Thread Burt P
Restore a check added in 440af105f2306d3c7b3b3f4d7530bab910d49cb9
but lost sometime after. avfilter_graph_set_auto_convert() will
have an effect once again.

Signed-off-by: Burt P 
---
 libavfilter/avfiltergraph.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 4275113..3af698d 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -507,6 +507,14 @@ static int query_formats(AVFilterGraph *graph, AVClass 
*log_ctx)
 char scale_args[256];
 char inst_name[30];
 
+if (graph->disable_auto_convert) {
+av_log(log_ctx, AV_LOG_ERROR,
+   "The filters '%s' and '%s' do not have a common 
format "
+   "and automatic conversion is disabled.\n",
+   link->src->name, link->dst->name);
+return AVERROR(EINVAL);
+}
+
 /* couldn't merge format lists. auto-insert conversion filter 
*/
 switch (link->type) {
 case AVMEDIA_TYPE_VIDEO:
-- 
2.7.4

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCHv2] avfiltergraph.c: restore disabling of auto conversions

2016-08-10 Thread Nicolas George
Le quartidi 24 thermidor, an CCXXIV, Burt P a écrit :
> Restore a check added in 440af105f2306d3c7b3b3f4d7530bab910d49cb9
> but lost sometime after. avfilter_graph_set_auto_convert() will
> have an effect once again.
> 
> Signed-off-by: Burt P 

LGTM, thanks for taking care of it.

Printing the list of formats may be useful, but that was not in the original
code, I just mention it as an idea for idle readers.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel