@ -41,14 +41,14 @@ static const char *exif_get_tag_name(uint16_t id)
}
static int exif_add_metadata ( AVCodecContext * av ctx, int count , int type ,
static int exif_add_metadata ( void * log ctx, int count , int type ,
const char * name , const char * sep ,
GetByteContext * gb , int le ,
AVDictionary * * metadata )
{
switch ( type ) {
case 0 :
av_log ( av ctx, AV_LOG_WARNING ,
av_log ( log ctx, AV_LOG_WARNING ,
" Invalid TIFF tag type 0 found for %s with size %d \n " ,
name , count ) ;
return 0 ;
@ -64,13 +64,13 @@ static int exif_add_metadata(AVCodecContext *avctx, int count, int type,
case TIFF_SLONG :
case TIFF_LONG : return ff_tadd_long_metadata ( count , name , sep , gb , le , metadata ) ;
default :
avpriv_request_sample ( av ctx, " TIFF tag type (%u) " , type ) ;
avpriv_request_sample ( log ctx, " TIFF tag type (%u) " , type ) ;
return 0 ;
} ;
}
static int exif_decode_tag ( AVCodecContext * av ctx, GetByteContext * gbytes , int le ,
static int exif_decode_tag ( void * log ctx, GetByteContext * gbytes , int le ,
int depth , AVDictionary * * metadata )
{
int ret , cur_pos ;
@ -92,7 +92,7 @@ static int exif_decode_tag(AVCodecContext *avctx, GetByteContext *gbytes, int le
// store metadata or proceed with next IFD
ret = ff_tis_ifd ( id ) ;
if ( ret ) {
ret = avpriv_exif_decode_ifd ( av ctx, gbytes , le , depth + 1 , metadata ) ;
ret = avpriv_exif_decode_ifd ( log ctx, gbytes , le , depth + 1 , metadata ) ;
} else {
const char * name = exif_get_tag_name ( id ) ;
char * use_name = ( char * ) name ;
@ -105,7 +105,7 @@ static int exif_decode_tag(AVCodecContext *avctx, GetByteContext *gbytes, int le
snprintf ( use_name , 7 , " 0x%04X " , id ) ;
}
ret = exif_add_metadata ( av ctx, count , type , use_name , NULL ,
ret = exif_add_metadata ( log ctx, count , type , use_name , NULL ,
gbytes , le , metadata ) ;
if ( ! name ) {
@ -119,7 +119,7 @@ static int exif_decode_tag(AVCodecContext *avctx, GetByteContext *gbytes, int le
}
int avpriv_exif_decode_ifd ( AVCodecContext * av ctx, GetByteContext * gbytes , int le ,
int avpriv_exif_decode_ifd ( void * log ctx, GetByteContext * gbytes , int le ,
int depth , AVDictionary * * metadata )
{
int i , ret ;
@ -132,7 +132,7 @@ int avpriv_exif_decode_ifd(AVCodecContext *avctx, GetByteContext *gbytes, int le
}
for ( i = 0 ; i < entries ; i + + ) {
if ( ( ret = exif_decode_tag ( av ctx, gbytes , le , depth , metadata ) ) < 0 ) {
if ( ( ret = exif_decode_tag ( log ctx, gbytes , le , depth , metadata ) ) < 0 ) {
return ret ;
}
}