[FFmpeg-devel] [PATCH 1/2] lavc: when w/h changes in reget buffer, print the values.

Stefano Sabatini stefasab at gmail.com
Wed Jan 18 02:33:09 CET 2012


On date Wednesday 2012-01-18 01:55:49 +0100, Michael Niedermayer encoded:
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavcodec/utils.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index ccccd54..ad17c67 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -603,7 +603,8 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){
>      assert(s->codec_type == AVMEDIA_TYPE_VIDEO);
>  
>      if (pic->data[0] && (pic->width != s->width || pic->height != s->height || pic->format != s->pix_fmt)) {
> -        av_log(s, AV_LOG_WARNING, "Width/height/fmt changing with reget buffer\n");

> +        av_log(s, AV_LOG_WARNING, "Width %d->%d/height %d->%d/fmt %d->%d changing with reget buffer\n",
> +               pic->width, s->width, pic->height, s->height, pic->format, s->pix_fmt);

I suggest (copy-pasting from ffmpeg.c):
"Picture changed from size:%dx%d fmt:%s to size:%dx%d fmt:%s in reget buffer()"

av_get_pix_fmt_name(pic->format), av_get_pix_fmt_name(s->pix_fmt)

can be used for showing pixel names in a more pleasant way.
-- 
FFmpeg = Furious and Freak Minimal Portable Ermetic Gnome


More information about the ffmpeg-devel mailing list