[FFmpeg-devel] [PATCH] tiffdec: notify user that tile support is missing

Stefano Sabatini stefasab at gmail.com
Wed Jan 11 11:23:03 CET 2012


On date Tuesday 2012-01-10 19:53:36 +0100, Stefano Sabatini encoded:
> On date Tuesday 2012-01-10 18:45:44 +0000, Paul B Mahol encoded:
> > ---
> >  libavcodec/tiff.c |    7 +++++++
> >  libavcodec/tiff.h |    4 ++++
> >  2 files changed, 11 insertions(+), 0 deletions(-)
> > 
> > diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
> > index b0ccbac..67aeb23 100644
> > --- a/libavcodec/tiff.c
> > +++ b/libavcodec/tiff.c
> > @@ -485,6 +485,13 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *
> >              return -1;
> >          }
> >          break;
> > +    case TIFF_TILE_BYTE_COUNTS:
> > +    case TIFF_TILE_LENGTH:
> > +    case TIFF_TILE_OFFSETS:
> > +    case TIFF_TILE_WIDTH:
> > +        av_log(s->avctx, AV_LOG_ERROR, "Tiled images are not supported\n");
> > +        return AVERROR_PATCHWELCOME;
> > +        break;
> >      case TIFF_PREDICTOR:
> >          s->predictor = value;
> >          break;
> > diff --git a/libavcodec/tiff.h b/libavcodec/tiff.h
> > index d5fad42..42cfb18 100644
> > --- a/libavcodec/tiff.h
> > +++ b/libavcodec/tiff.h
> > @@ -56,6 +56,10 @@ enum TiffTags{
> >      TIFF_SOFTWARE_NAME = 0x131,
> >      TIFF_PREDICTOR = 0x13D,
> >      TIFF_PAL = 0x140,
> > +    TIFF_TILE_WIDTH = 0x142,
> > +    TIFF_TILE_LENGTH = 0x143,
> > +    TIFF_TILE_OFFSETS = 0x144,
> > +    TIFF_TILE_BYTE_COUNTS = 0x145,
> >      TIFF_YCBCR_COEFFICIENTS = 0x211,
> >      TIFF_YCBCR_SUBSAMPLING = 0x212,
> >      TIFF_YCBCR_POSITIONING = 0x213,
> 
> LGTM, I'll apply it soon if I read no more comments.

Applied, thanks.

BTW ffprobe is returning -1 but this is not a tiff-related problem.
-- 
FFmpeg = Foolish and Friendly Marvellous Plastic Ephemeral God


More information about the ffmpeg-devel mailing list