On date Friday 2011-05-13 10:27:00 +0200, Kostya encoded:
> On Mon, May 09, 2011 at 09:26:39PM +0200, Stefano Sabatini wrote:
> > ---
> >  libavcodec/tiff.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
> > index fcbb1af..8a565ef 100644
> > --- a/libavcodec/tiff.c
> > +++ b/libavcodec/tiff.c
> > @@ -472,6 +472,8 @@ static int tiff_decode_tag(TiffContext *s, const 
> > uint8_t *start, const uint8_t *
> >          if(s->compr == TIFF_G4)
> >              s->fax_opts = value;
> >          break;
> > +    default:
> > +        av_log(s->avctx, AV_LOG_WARNING, "Unknown or unsupported tag 
> > %d/0X%0X\n", tag, tag);
> >      }
> >      return 0;
> >  }
> 
> That may create too much warning spam. Can you please look at the spec and see
> if at least all standard sets of tags for mono/palette/full colour cases are
> handled in decoder? For example, DPI info and such.

We're missing ResolutionUnit (which may be used for detecting sample
aspect ratio, togheter with XResolution/YResolution). Metadata tags
could be handled if we had metadata support in libavcodec (maybe
metadata should be moved to lavu).

In some of my samples collection there is also a 274/0X112/Orientation
tag, which may be useful for auto-rotation purposes (we need an affine
transform filter for that).

But I see your point, thus I increased the loglevel to DEBUG, feel
free to apply this or a variant of this.
-- 
After your lover has gone you will still have PEANUT BUTTER!
>From b27d92f995fffcedb3191d03a763956604c48c11 Mon Sep 17 00:00:00 2001
From: Stefano Sabatini <[email protected]>
Date: Mon, 9 May 2011 21:26:39 +0200
Subject: [PATCH] tiff: print log in case of unknown / unsupported tag

Helps debugging.
---
 libavcodec/tiff.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 587ddc6..9900161 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -474,6 +474,9 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *
         if(s->compr == TIFF_G4)
             s->fax_opts = value;
         break;
+
+    default:
+        av_log(s->avctx, AV_LOG_DEBUG, "Unknown or unsupported tag %d/0X%0X\n", tag, tag);
     }
     return 0;
 }
-- 
1.7.2.3

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to