[FFmpeg-devel] [PATCH]Print demuxer name after successful probing

Stefano Sabatini stefano.sabatini-lala at poste.it
Tue Apr 19 11:15:25 CEST 2011


On date Tuesday 2011-04-19 10:54:13 +0200, Carl Eugen Hoyos encoded:
> Hi!
> 
> I find attached very useful, but maybe I miss why this wasn't added before.
> 
> Please comment, Carl Eugen

> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 1919f61..cfce076 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -594,9 +594,9 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
>          *fmt = av_probe_input_format2(&pd, 1, &score);
>          if(*fmt){
>              if(score <= AVPROBE_SCORE_MAX/4){ //this can only be true in the last iteration
> -                av_log(logctx, AV_LOG_WARNING, "Format detected only with low score of %d, misdetection possible!\n", score);
> +                av_log(logctx, AV_LOG_WARNING, "%s: Format detected only with low score of %d, misdetection possible!\n", (*fmt)->name, score);
>              }else
> -                av_log(logctx, AV_LOG_DEBUG, "Probed with size=%d and score=%d\n", probe_size, score);
> +                av_log(logctx, AV_LOG_DEBUG, "%s: Probed with size=%d and score=%d\n", (*fmt)->name, probe_size, score);

Looks fine to me, maybe more explicit:

... "Format '%s' detected only with low score of %d, misdetection possible!\n", (*fmt)->name, score);
... "Format '%s' probed with size=%d and score=%d\n", (*fmt)->name, probe_size, score);
-- 
FFmpeg = Foolish and Furious Mysterious Portentous Elected Gymnast


More information about the ffmpeg-devel mailing list