openbsd-ports/graphics/ffmpeg/patches/patch-libavcodec_libfaad_c
jakemsr d5240098e3 update to ffmpeg subversion snapshot from 2010-05-12
update needed for newer x264 and for gcc4.  this causes yet more
fallout as some libav* functions other ports were using have been
fully deprecated.  commits coming rsn ...

mostly from new MAINTAINER
2010-05-26 21:38:52 +00:00

50 lines
2.4 KiB
Plaintext

$OpenBSD: patch-libavcodec_libfaad_c,v 1.5 2010/05/26 21:38:52 jakemsr Exp $
--- libavcodec/libfaad.c.orig Tue May 11 19:20:53 2010
+++ libavcodec/libfaad.c Wed May 12 19:16:19 2010
@@ -76,14 +76,14 @@ typedef struct {
#else
unsigned char FAADAPI (*faacDecSetConfiguration)(faacDecHandle hDecoder,
faacDecConfigurationPtr config);
- long FAADAPI (*faacDecInit)(faacDecHandle hDecoder,
+ int FAADAPI (*faacDecInit)(faacDecHandle hDecoder,
unsigned char *buffer,
- unsigned long buffer_size,
- unsigned long *samplerate,
+ unsigned int buffer_size,
+ unsigned int *samplerate,
unsigned char *channels);
char FAADAPI (*faacDecInit2)(faacDecHandle hDecoder, unsigned char *pBuffer,
unsigned long SizeOfDecoderSpecificInfo,
- unsigned long *samplerate, unsigned char *channels);
+ unsigned int *samplerate, unsigned char *channels);
void *FAADAPI (*faacDecDecode)(faacDecHandle hDecoder,
faacDecFrameInfo *hInfo,
unsigned char *buffer,
@@ -120,7 +120,7 @@ static void channel_setup(AVCodecContext *avctx)
static av_cold int faac_init_mp4(AVCodecContext *avctx)
{
FAACContext *s = avctx->priv_data;
- unsigned long samplerate;
+ unsigned int samplerate;
#ifndef FAAD2_VERSION
unsigned long channels;
#else
@@ -134,7 +134,7 @@ static av_cold int faac_init_mp4(AVCodecContext *avctx
&samplerate, &channels);
if (r < 0){
av_log(avctx, AV_LOG_ERROR,
- "faacDecInit2 failed r:%d sr:%ld ch:%ld s:%d\n",
+ "faacDecInit2 failed r:%d sr:%d ch:%ld s:%d\n",
r, samplerate, (long)channels, avctx->extradata_size);
} else {
avctx->sample_rate = samplerate;
@@ -179,7 +179,7 @@ static int faac_decode_frame(AVCodecContext *avctx,
#else
if(!s->init){
- unsigned long srate;
+ unsigned int srate;
unsigned char channels;
int r = s->faacDecInit(s->faac_handle, buf, buf_size, &srate, &channels);
if(r < 0){