Allan Jacobs - 2006-07-17

Logged In: YES
user_id=983755

% diff new/faad2/common/mp4ff/mp4ff.c \
old/faad2/common/mp4ff/mp4ff.c
30d29
<
33,41d31
< static void mp4ff_track_add(mp4ff_t *f)
< {
< f->total_tracks++;
<
< f->track[f->total_tracks - 1] =
malloc(sizeof(mp4ff_track_t));
<
< memset(f->track[f->total_tracks - 1], 0,
sizeof(mp4ff_track_t));
< }
<
99a90,98
> static void mp4ff_track_add(mp4ff_t *f)
> {
> f->total_tracks++;
>
> f->track[f->total_tracks - 1] =
malloc(sizeof(mp4ff_track_t));
>
> memset(f->track[f->total_tracks - 1], 0,
sizeof(mp4ff_track_t));
> }
>
% diff new/faad2/common/mp4ff/mp4ffint.h \
old/faad2/common/mp4ff/mp4ffint.h
304c304
< static void mp4ff_track_add(mp4ff_t *f);
---
> void mp4ff_track_add(mp4ff_t *f);
329c329
< #endif
---
> #endif
\ No newline at end of file

I had to alter some openquicktime-2.0.0a1 source code as
well. The first is in
openquicktime-2.0.0a1/videoplugins/sorenson/svq1.c
This is not a bug in the source code. It's caused by
a flaw in gcc. (new is < and old is >).
1251d1250
< oqt_uint32_t *tmp1, *tmp2;
1259,1266c1258,1259
< /* n1 = *(((oqt_uint32_t *) src1)++); */
< /* n2 = *(((oqt_uint32_t *) src2)++); */
< tmp1 = (oqt_uint32_t *) src1;
< tmp2 = (oqt_uint32_t *) src2;
< tmp1 += 1;
< tmp2 += 1;
< n1 = *tmp1;
< n2 = *tmp2;
---
> n1 = *(((oqt_uint32_t *) src1)++);
> n2 = *(((oqt_uint32_t *) src2)++);

There is a problem in the source code for openquicktime
that is real in codec_faac.c. (new is < and old is >).
openquicktime-2.0.0a1/audioplugins/aac/codec_faac.c
171c171
< res = faacDecInit(p->hDecoder, input, inputsize,
&p->samplerate, &p->channels);
---
> res = faacDecInit(p->hDecoder, input,
&p->samplerate, &p->channels);
194c194
< sample_buffer = faacDecDecode(p->hDecoder, &frameInfo,
input+inputpos, inputsize-inputpos);
---
> sample_buffer = faacDecDecode(p->hDecoder, &frameInfo,
input+inputpos);