On date Wednesday 2011-11-16 22:01:38 +0100, Thomas Kühnel encoded:
> Hi,
>
> On 15.11.2011 15:48, Justin Ruggles wrote:
> >
> >Hi Thomas,
> >
> >>+static int add_doubles_metadata(const uint8_t **buf, int count,
> >>+ const char *name, const char *sep,
> >>+ TiffContext *s)
> >>+{
> >>+ char *ap;
> >>+ int i;
> >>+ double *dp = av_malloc(count * type_sizes[TIFF_DOUBLE]);
> >[...]
> >>+static int add_shorts_metadata(const uint8_t **buf, int count, const char
> >>*name,
> >>+ const char *sep, TiffContext *s)
> >>+{
> >>+ char *ap;
> >>+ int i;
> >>+ int *sp = av_malloc(count * type_sizes[TIFF_DOUBLE]);
> >[...]
> >
> >>+ case TIFF_GEO_DOUBLE_PARAMS:
> >>+ dp = av_malloc(count * type_sizes[TIFF_DOUBLE]);
> >
> >
> >
> >Those av_malloc() should use sizeof(int) and sizeof(double) instead of
> >type_sizes[]. The TIFF data is converted to native types in the tget_*
> >functions.
> >
> Okay, it's fixed now.
>
> >Thanks,
> >Justin
> >
> >
> >_______________________________________________
> >libav-devel mailing list
> >[email protected]
> >https://lists.libav.org/mailman/listinfo/libav-devel
>
> Thomas
> From e05994908a741f9de4a01541f65947ab90392c65 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Thomas=20K=C3=BChnel?= <[email protected]>
> Date: Tue, 4 Oct 2011 00:19:52 +0200
> Subject: [PATCH] tiff: Add GeoTIFF support to the TIFF decoder
>
> ---
> libavcodec/Makefile | 4 +-
> libavcodec/tiff.c | 314 +++++++++
> libavcodec/tiff.h | 90 +++-
> libavcodec/tiff_data.c | 1826
> ++++++++++++++++++++++++++++++++++++++++++++++++
> libavcodec/tiff_data.h | 87 +++
> libavcodec/tiffenc.c | 4 +-
> 6 files changed, 2319 insertions(+), 6 deletions(-)
> create mode 100644 libavcodec/tiff_data.c
> create mode 100644 libavcodec/tiff_data.h
>
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index b9ed8db..c56ceea 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
[...]
> +typedef struct TiffGeoTag {
> + enum TiffGeoTagKey key;
> + enum TiffTags type;
> + int count;
> + int offset;
> + char *val;
> +} TiffGeoTag;
> +
> +typedef struct TiffGeoTagKeyName {
> + const enum TiffGeoTagKey key;
> + const char *const name;
> +} TiffGeoTagKeyName;
> +
> +typedef struct TiffGeoTagNameType {
> + const char *const name;
> + const enum TiffGeoTagType type;
> +} TiffGeoTagNameType;
> +
Thanks, reads much better to me now.
No more comments from me, very nice work.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel