|
From: Jean-Francois P. <pan...@di...> - 2002-01-13 21:20:52
|
Here's a diff which allows the current CVS snapshot to compile without
warnings on IRIX/MIPSpro. Most of the changes are trivial:
- unused local variables
- nested comments
- broken printf specifications
Exceptions are:
plugin.c
quicktime_delete_external_vcodec()
quicktime_delete_external_acodec()
Both of these non-void functions fail to return anything, even though
their return value is used. Added a FIXME comment.
Also, since that code comes from somewhere else, I didn't touch lame
or mpg123. Hope this is useful. BTW, the fix to the configure script
seems to work, it now runs fine under IRIX.
Hope this is a bit useful,
JF
diff -r -c OpenQuicktime/atom.c OpenQuicktime.new/atom.c
*** OpenQuicktime/atom.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/atom.c Sun Jan 13 15:38:32 2002
***************
*** 39,45 ****
{
char header[10];
int result;
- longest size2;
quicktime_atom_reset(atom);
--- 39,44 ----
diff -r -c OpenQuicktime/audioplugin/MP3/codec_MP3.c OpenQuicktime.new/audioplugin/MP3/codec_MP3.c
*** OpenQuicktime/audioplugin/MP3/codec_MP3.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/audioplugin/MP3/codec_MP3.c Sun Jan 13 16:01:41 2002
***************
*** 72,78 ****
/* chunk. The number of samples in a chunk should end on a block boundary. */
unsigned int MP3_samples_to_bytes(unsigned int samples, int channels)
{
! unsigned int result = /*17266/*50000/*/((samples*3753*8/*2*channels*/)/(41472));
return result;
}
--- 72,78 ----
/* chunk. The number of samples in a chunk should end on a block boundary. */
unsigned int MP3_samples_to_bytes(unsigned int samples, int channels)
{
! unsigned int result = ((samples*3753*8/*2*channels*/)/(41472));
return result;
}
***************
*** 267,274 ****
int quicktime_codec_register( quicktime_extern_audio_t*codec)
{
- int i;
-
codec->init = init_MP3;
codec->encode = encode_MP3;
codec->decode = decode_MP3;
--- 267,272 ----
diff -r -c OpenQuicktime/codecs.c OpenQuicktime.new/codecs.c
*** OpenQuicktime/codecs.c Sun Jan 6 11:58:02 2002
--- OpenQuicktime.new/codecs.c Sun Jan 13 15:40:16 2002
***************
*** 224,232 ****
int track)
{
int result;
- quicktime_trak_t *trak = file->vtracks[track].track;
- int track_height = trak->tkhd.track_height;
- int track_width = trak->tkhd.track_width;
//printf("quicktime_decode_video 1\n");
file->color_model = color_model;
--- 224,229 ----
***************
*** 310,316 ****
longest quicktime_samples_to_bytes(quicktime_trak_t *track, long samples)
{
- char *compressor = track->mdia.minf.stbl.stsd.table[0].format;
int channels = track->mdia.minf.stbl.stsd.table[0].channels;
/* Default use the sample size specification for TWOS and RAW */
--- 307,312 ----
diff -r -c OpenQuicktime/dechunk.c OpenQuicktime.new/dechunk.c
*** OpenQuicktime/dechunk.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/dechunk.c Sun Jan 13 15:19:45 2002
***************
*** 22,28 ****
#include "funcprotos.h"
#include "openquicktime.h"
! int usage(void)
{
printf("usage: dechunk [-f framerate] <input movie> <output prefix>\n");
printf(" Movies containing rgb frames are written as ppm images.\n");
--- 22,28 ----
#include "funcprotos.h"
#include "openquicktime.h"
! void usage(void)
{
printf("usage: dechunk [-f framerate] <input movie> <output prefix>\n");
printf(" Movies containing rgb frames are written as ppm images.\n");
***************
*** 33,39 ****
{
quicktime_t *file;
FILE *output;
- int result = 0;
int i, j;
longest length;
char string[1024], *prefix = 0, *input = 0;
--- 33,38 ----
diff -r -c OpenQuicktime/dump.c OpenQuicktime.new/dump.c
*** OpenQuicktime/dump.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/dump.c Sun Jan 13 15:20:30 2002
***************
*** 31,37 ****
int main(int argc, char *argv[])
{
quicktime_t *file;
- int result = 0;
if(argc < 2)
{
--- 31,36 ----
diff -r -c OpenQuicktime/elst.c OpenQuicktime.new/elst.c
*** OpenQuicktime/elst.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/elst.c Sun Jan 13 15:40:27 2002
***************
*** 104,110 ****
void quicktime_read_elst(quicktime_t *file, quicktime_elst_t *elst)
{
long i;
- quicktime_atom_t leaf_atom;
elst->version = quicktime_read_char(file);
elst->flags = quicktime_read_int24(file);
--- 104,109 ----
diff -r -c OpenQuicktime/make_streamable.c OpenQuicktime.new/make_streamable.c
*** OpenQuicktime/make_streamable.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/make_streamable.c Sun Jan 13 15:20:11 2002
***************
*** 23,29 ****
int main(int argc, char *argv[])
{
- int i;
if(argc < 3 || argv[1][0] == '-')
{
printf("usage: %s <in filename> <out filename>\n", argv[0]);
--- 23,28 ----
diff -r -c OpenQuicktime/moov.c OpenQuicktime.new/moov.c
*** OpenQuicktime/moov.c Sun Oct 21 16:56:17 2001
--- OpenQuicktime.new/moov.c Sun Jan 13 15:43:11 2002
***************
*** 40,46 ****
int quicktime_moov_delete(quicktime_moov_t *moov)
{
- int i;
while(moov->total_tracks) quicktime_delete_trak(moov);
quicktime_mvhd_delete(&(moov->mvhd));
quicktime_udta_delete(&(moov->udta));
--- 40,45 ----
***************
*** 79,92 ****
unsigned char *moov_buf = 0;
longest cmov_sz, tlen;
int moov_sz;
- int cmov_ret = 0;
- long cmov_comp = 0;
quicktime_atom_read_header(file, &compressed_atom);
if(quicktime_atom_is(&compressed_atom, "dcom"))
{
- quicktime_atom_t compressed_type_atom;
int zlibfourcc;
longest offset;
--- 78,88 ----
diff -r -c OpenQuicktime/openquicktime.c OpenQuicktime.new/openquicktime.c
*** OpenQuicktime/openquicktime.c Sun Jan 6 11:58:02 2002
--- OpenQuicktime.new/openquicktime.c Sun Jan 13 15:37:13 2002
***************
*** 437,446 ****
OPENQUICKTIMELIB_API long OQT_STDCALL quicktime_audio_length(quicktime_t *file, int track)
{
quicktime_stts_t *stts = &(file->atracks[track].track->mdia.minf.stbl.stts);
- long i;
if(file->total_atracks > 0) {
- i = stts->total_entries - 1;
/* Yann: I've modified this to handle samples with a duration
different from 1 ... needed for ".mp3" fourcc */
--- 437,444 ----
***************
*** 698,708 ****
OPENQUICKTIMELIB_API long OQT_STDCALL quicktime_read_audio(quicktime_t *file, char *audio_buffer, long samples, int track)
{
longest chunk_sample, chunk;
! int result = 1, track_num;
quicktime_trak_t *trak = file->atracks[track].track;
longest fragment_len, chunk_end;
longest position = file->atracks[track].current_position;
! longest start = position, end = position + samples;
longest bytes, total_bytes = 0;
longest buffer_offset;
--- 696,706 ----
OPENQUICKTIMELIB_API long OQT_STDCALL quicktime_read_audio(quicktime_t *file, char *audio_buffer, long samples, int track)
{
longest chunk_sample, chunk;
! int result = 1;
quicktime_trak_t *trak = file->atracks[track].track;
longest fragment_len, chunk_end;
longest position = file->atracks[track].current_position;
! longest end = position + samples;
longest bytes, total_bytes = 0;
longest buffer_offset;
***************
*** 782,788 ****
for(trak = 0; trak < file->total_vtracks; trak++) {
packet = quicktime_offset_to_chunk(&packet_start, file->vtracks[trak].track, current_position);
! printf("video_packet %d, video position %li\n", packet, packet_start);
if(current_position - packet_start < min_video_delta) {
min_video_delta = current_position - packet_start;
min_video_trak = trak;
--- 780,786 ----
for(trak = 0; trak < file->total_vtracks; trak++) {
packet = quicktime_offset_to_chunk(&packet_start, file->vtracks[trak].track, current_position);
! printf("video_packet %d, video position %lld\n", packet, packet_start);
if(current_position - packet_start < min_video_delta) {
min_video_delta = current_position - packet_start;
min_video_trak = trak;
***************
*** 793,799 ****
for(trak = 0; trak < file->total_atracks; trak++) {
packet = quicktime_offset_to_chunk(&packet_start, file->atracks[trak].track, current_position);
! printf("audio packet %d, audio position %li ", packet, packet_start);
if(current_position - packet_start < min_audio_delta) {
min_audio_delta = current_position - packet_start;
min_audio_trak = trak;
--- 791,797 ----
for(trak = 0; trak < file->total_atracks; trak++) {
packet = quicktime_offset_to_chunk(&packet_start, file->atracks[trak].track, current_position);
! printf("audio packet %d, audio position %lld ", packet, packet_start);
if(current_position - packet_start < min_audio_delta) {
min_audio_delta = current_position - packet_start;
min_audio_trak = trak;
***************
*** 803,809 ****
}
if(min_audio_delta < min_video_delta) {
longest chunksize = file->atracks[min_audio_trak].track->mdia.minf.stbl.stsz.table[min_audio_packet-1].size;
! printf("audio chunksize %li min_audio_start %li\n", chunksize, min_audio_start);
*thetrak = min_audio_trak;
*isVideo = 0;
file->quicktime_fseek(file, min_audio_start);
--- 801,807 ----
}
if(min_audio_delta < min_video_delta) {
longest chunksize = file->atracks[min_audio_trak].track->mdia.minf.stbl.stsz.table[min_audio_packet-1].size;
! printf("audio chunksize %lld min_audio_start %lld\n", chunksize, min_audio_start);
*thetrak = min_audio_trak;
*isVideo = 0;
file->quicktime_fseek(file, min_audio_start);
***************
*** 811,817 ****
return chunksize;
} else {
longest chunksize = file->vtracks[min_video_trak].track->mdia.minf.stbl.stsz.table[min_video_packet-1].size;
! printf("video chunksize %li\n", chunksize);
*thetrak = min_video_trak;
*isVideo = 1;
file->quicktime_fseek(file, min_video_start);
--- 809,815 ----
return chunksize;
} else {
longest chunksize = file->vtracks[min_video_trak].track->mdia.minf.stbl.stsz.table[min_video_packet-1].size;
! printf("video chunksize %lld\n", chunksize);
*thetrak = min_video_trak;
*isVideo = 1;
file->quicktime_fseek(file, min_video_start);
***************
*** 830,836 ****
longest bytes;
int result = 0;
- quicktime_trak_t *trak = file->vtracks[track].track;
bytes = quicktime_frame_size(file, file->vtracks[track].current_position, track);
quicktime_set_video_position(file, file->vtracks[track].current_position, track);
--- 828,833 ----
***************
*** 929,935 ****
OPENQUICKTIMELIB_API int OQT_STDCALL quicktime_read_frame_init(quicktime_t *file, int track)
{
- quicktime_trak_t *trak = file->vtracks[track].track;
quicktime_set_video_position(file, file->vtracks[track].current_position, track);
if(quicktime_ftell(file) != file->file_position)
{
--- 926,931 ----
***************
*** 958,965 ****
int quicktime_delete_video_map(quicktime_t *file, quicktime_video_map_t *vtrack)
{
- int i;
-
if(file->quicktime_delete_vcodec)
file->quicktime_delete_vcodec(file, vtrack);
return 0;
--- 954,959 ----
***************
*** 978,984 ****
int quicktime_delete_audio_map(quicktime_t *file, quicktime_audio_map_t *atrack)
{
- int i;
if(file->quicktime_delete_acodec)
file->quicktime_delete_acodec(file, atrack);
return 0;
--- 972,977 ----
***************
*** 987,996 ****
OPENQUICKTIMELIB_API int OQT_STDCALL quicktime_read_info(quicktime_t *file)
{
int result = 0, found_moov = 0;
! int i, channel, trak_channel, track;
longest start_position = quicktime_position(file);
quicktime_atom_t leaf_atom;
- quicktime_trak_t *trak;
char avi_test[4];
int found_mdat=0;
--- 980,988 ----
OPENQUICKTIMELIB_API int OQT_STDCALL quicktime_read_info(quicktime_t *file)
{
int result = 0, found_moov = 0;
! int i, track;
longest start_position = quicktime_position(file);
quicktime_atom_t leaf_atom;
char avi_test[4];
int found_mdat=0;
diff -r -c OpenQuicktime/plugin.c OpenQuicktime.new/plugin.c
*** OpenQuicktime/plugin.c Sun Jan 6 11:58:02 2002
--- OpenQuicktime.new/plugin.c Sun Jan 13 16:05:07 2002
***************
*** 115,125 ****
static int decode_chunk_external(quicktime_t *file, int track, long chunk, int channel, quicktime_extern_audio_t *codec)
{
int result = 0;
- int i, j, ret, size = 0;
long chunk_samples, chunk_bytes, chunk_bytes1, chunk_bytes2;
- unsigned char *chunk_ptr, *block_ptr;
quicktime_trak_t *trak = file->atracks[track].track;
! longest offset, chunk_offset;
ChunkList *selectedChunk;
// printf("decode_chunk_external chunk %d\n", chunk);
--- 115,123 ----
static int decode_chunk_external(quicktime_t *file, int track, long chunk, int channel, quicktime_extern_audio_t *codec)
{
int result = 0;
long chunk_samples, chunk_bytes, chunk_bytes1, chunk_bytes2;
quicktime_trak_t *trak = file->atracks[track].track;
! longest offset;
ChunkList *selectedChunk;
// printf("decode_chunk_external chunk %d\n", chunk);
***************
*** 227,238 ****
int channel)
{
int index = 0;
- quicktime_audio_map_t *atrack = &(file->atracks[track]);
char *compressor;
quicktime_extern_audio_t *codec;
int result = 0;
longest chunk_sample, chunk;
! unsigned int chunk_bytes, chunk_samples;
unsigned long int i, chunk_start, chunk_end;
quicktime_trak_t *trak = file->atracks[track].track;
--- 225,235 ----
int channel)
{
int index = 0;
char *compressor;
quicktime_extern_audio_t *codec;
int result = 0;
longest chunk_sample, chunk;
! unsigned int chunk_samples;
unsigned long int i, chunk_start, chunk_end;
quicktime_trak_t *trak = file->atracks[track].track;
***************
*** 258,270 ****
{
/* Get chunk we're on. */
chunk_samples = quicktime_chunk_samples(trak, chunk);
!
! /* if(!codec->work_buffer /*|| /*codec->chunk != chunk ||
codec->buffer_channel != channel)
! {*/
/* read a new chunk if necessary */
result = decode_chunk_external(file, track, chunk, channel, codec);
! // }
/* Get boundaries from the chunk */
chunk_start = 0;
--- 255,271 ----
{
/* Get chunk we're on. */
chunk_samples = quicktime_chunk_samples(trak, chunk);
!
! #if 0
! if(!codec->work_buffer || codec->chunk != chunk ||
codec->buffer_channel != channel)
! {
! #endif
/* read a new chunk if necessary */
result = decode_chunk_external(file, track, chunk, channel, codec);
! #if 0
! }
! #endif
/* Get boundaries from the chunk */
chunk_start = 0;
***************
*** 483,489 ****
quicktime_video_map_t *vtrack = &(file->vtracks[track]);
unsigned int bytes;
char *compressor;
- int i=0;
compressor = quicktime_video_compressor(file, track);
index=quicktime_find_vcodec(compressor);
--- 484,489 ----
***************
*** 521,527 ****
} else {
fprintf(stderr,
! "Decode_video : Can't find the corresponding codec: ",
quicktime_video_compressor(file, track) );
}
--- 521,527 ----
} else {
fprintf(stderr,
! "Decode_video : Can't find the corresponding codec: %s\n",
quicktime_video_compressor(file, track) );
}
***************
*** 593,599 ****
}
else
fprintf(stderr,
! "encode_video_external: Can't find the corresponding codec: ",
quicktime_video_compressor(file, track) );
return error;
--- 593,599 ----
}
else
fprintf(stderr,
! "encode_video_external: Can't find the corresponding codec: %s\n",
quicktime_video_compressor(file, track) );
return error;
***************
*** 775,780 ****
--- 775,781 ----
}
}
+ /* FIXME: non-void function needs to return something */
}
***************
*** 866,871 ****
--- 867,873 ----
total_acodecs = newtotal_acodecs;
}
}
+ /* FIXME: non-void function needs to return something */
}
***************
*** 873,880 ****
int colormodel,
int track)
{
- quicktime_video_map_t *vtrack = &(file->vtracks[track]);
- unsigned int bytes;
char *compressor;
int index;
--- 875,880 ----
diff -r -c OpenQuicktime/stco.c OpenQuicktime.new/stco.c
*** OpenQuicktime/stco.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/stco.c Sun Jan 13 15:52:06 2002
***************
*** 112,119 ****
void quicktime_update_stco(quicktime_stco_t *stco, long chunk, longest offset)
{
- long i;
-
if(chunk > stco->entries_allocated)
{
stco->entries_allocated = chunk * 2;
--- 112,117 ----
diff -r -c OpenQuicktime/stsc.c OpenQuicktime.new/stsc.c
*** OpenQuicktime/stsc.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/stsc.c Sun Jan 13 15:52:17 2002
***************
*** 138,145 ****
int quicktime_update_stsc(quicktime_stsc_t *stsc, long chunk, long samples)
{
- long i;
-
if(chunk > stsc->entries_allocated)
{
stsc->entries_allocated = chunk * 2;
--- 138,143 ----
diff -r -c OpenQuicktime/stsd.c OpenQuicktime.new/stsd.c
*** OpenQuicktime/stsd.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/stsd.c Sun Jan 13 15:52:31 2002
***************
*** 114,120 ****
void quicktime_read_stsd(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_t *stsd)
{
long i;
- quicktime_atom_t leaf_atom;
stsd->version = quicktime_read_char(file);
stsd->flags = quicktime_read_int24(file);
--- 114,119 ----
diff -r -c OpenQuicktime/stsdtable.c OpenQuicktime.new/stsdtable.c
*** OpenQuicktime/stsdtable.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/stsdtable.c Sun Jan 13 15:52:59 2002
***************
*** 105,111 ****
void quicktime_read_stsd_video(quicktime_t *file, quicktime_stsd_table_t *table, quicktime_atom_t *parent_atom)
{
quicktime_atom_t leaf_atom;
- int len;
table->version = quicktime_read_int16(file);
table->revision = quicktime_read_int16(file);
--- 105,110 ----
***************
*** 118,124 ****
table->dpi_vertical = quicktime_read_fixed32(file);
table->data_size = quicktime_read_int32(file);
table->frames_per_sample = quicktime_read_int16(file);
! len = quicktime_read_char(file);
file->quicktime_read_data(file, table->compressor_name, 31);
table->depth = quicktime_read_int16(file);
table->ctab_id = quicktime_read_int16(file);
--- 117,123 ----
table->dpi_vertical = quicktime_read_fixed32(file);
table->data_size = quicktime_read_int32(file);
table->frames_per_sample = quicktime_read_int16(file);
! quicktime_read_char(file);
file->quicktime_read_data(file, table->compressor_name, 31);
table->depth = quicktime_read_int16(file);
table->ctab_id = quicktime_read_int16(file);
diff -r -c OpenQuicktime/stsz.c OpenQuicktime.new/stsz.c
*** OpenQuicktime/stsz.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/stsz.c Sun Jan 13 15:55:18 2002
***************
*** 97,108 ****
void quicktime_write_stsz(quicktime_t *file, quicktime_stsz_t *stsz)
{
! long i, result;
quicktime_atom_t atom;
quicktime_atom_write_header(file, &atom, "stsz");
/* optimize if possible */
/* Xanim requires an unoptimized table for video. */
/* if(!stsz->sample_size) */
/* { */
/* for(i = 0, result = 0; i < stsz->total_entries && !result; i++) */
--- 97,109 ----
void quicktime_write_stsz(quicktime_t *file, quicktime_stsz_t *stsz)
{
! long i;
quicktime_atom_t atom;
quicktime_atom_write_header(file, &atom, "stsz");
/* optimize if possible */
/* Xanim requires an unoptimized table for video. */
+ /* long result; */
/* if(!stsz->sample_size) */
/* { */
/* for(i = 0, result = 0; i < stsz->total_entries && !result; i++) */
***************
*** 139,146 ****
void quicktime_update_stsz(quicktime_stsz_t *stsz, long sample, long sample_size)
{
- long i;
-
if(!stsz->sample_size)
{
if(sample >= stsz->entries_allocated)
--- 140,145 ----
diff -r -c OpenQuicktime/tkhd.c OpenQuicktime.new/tkhd.c
*** OpenQuicktime/tkhd.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/tkhd.c Sun Jan 13 15:56:21 2002
***************
*** 30,36 ****
tkhd->flags = 15;
tkhd->creation_time = quicktime_current_time();
tkhd->modification_time = quicktime_current_time();
! tkhd->track_id;
tkhd->reserved1 = 0;
tkhd->duration = 0; /* need to set this when closing */
for(i = 0; i < 8; i++) tkhd->reserved2[i] = 0;
--- 30,36 ----
tkhd->flags = 15;
tkhd->creation_time = quicktime_current_time();
tkhd->modification_time = quicktime_current_time();
! tkhd->track_id = 0;
tkhd->reserved1 = 0;
tkhd->duration = 0; /* need to set this when closing */
for(i = 0; i < 8; i++) tkhd->reserved2[i] = 0;
diff -r -c OpenQuicktime/trak.c OpenQuicktime.new/trak.c
*** OpenQuicktime/trak.c Sun Jan 6 11:58:02 2002
--- OpenQuicktime.new/trak.c Sun Jan 13 15:57:21 2002
***************
*** 187,195 ****
{
/* get the byte endpoint of the track in the file */
longest size = 0;
! longest chunk, chunk_offset, chunk_samples, sample;
quicktime_stsz_t *stsz = &(trak->mdia.minf.stbl.stsz);
- quicktime_stsz_table_t *table = stsz->table;
quicktime_stsc_t *stsc = &(trak->mdia.minf.stbl.stsc);
quicktime_stco_t *stco;
--- 187,194 ----
{
/* get the byte endpoint of the track in the file */
longest size = 0;
! longest chunk, chunk_samples, sample;
quicktime_stsz_t *stsz = &(trak->mdia.minf.stbl.stsz);
quicktime_stsc_t *stsc = &(trak->mdia.minf.stbl.stsc);
quicktime_stco_t *stco;
***************
*** 197,203 ****
/* the chunk offsets contain the HEADER_LENGTH themselves */
stco = &(trak->mdia.minf.stbl.stco);
chunk = stco->total_entries;
! size = chunk_offset = stco->table[chunk - 1].offset;
/* get the number of samples in the last chunk */
chunk_samples = stsc->table[stsc->total_entries - 1].samples;
--- 196,202 ----
/* the chunk offsets contain the HEADER_LENGTH themselves */
stco = &(trak->mdia.minf.stbl.stco);
chunk = stco->total_entries;
! size = stco->table[chunk - 1].offset;
/* get the number of samples in the last chunk */
chunk_samples = stsc->table[stsc->total_entries - 1].samples;
***************
*** 403,409 ****
long chunk_sample,
long sample)
{
- quicktime_stsz_table_t *table = trak->mdia.minf.stbl.stsz.table;
quicktime_stts_t *stts = &(trak->mdia.minf.stbl.stts);
longest i, total;
--- 402,407 ----
diff -r -c OpenQuicktime/util.c OpenQuicktime.new/util.c
*** OpenQuicktime/util.c Sun Jan 6 11:58:02 2002
--- OpenQuicktime.new/util.c Sun Jan 13 15:57:59 2002
***************
*** 88,94 ****
{
printf("Deleting Decompressed buffer\n");
file->decompressed_position = 0;
! file->decompressed_buffer_size;
free(file->decompressed_buffer);
file->decompressed_buffer = NULL;
}
--- 88,94 ----
{
printf("Deleting Decompressed buffer\n");
file->decompressed_position = 0;
! file->decompressed_buffer_size = 0;
free(file->decompressed_buffer);
file->decompressed_buffer = NULL;
}
diff -r -c OpenQuicktime/videoplugin/PHOTO_JPEG/codec_jpeg.c OpenQuicktime.new/videoplugin/PHOTO_JPEG/codec_jpeg.c
*** OpenQuicktime/videoplugin/PHOTO_JPEG/codec_jpeg.c Wed Jul 25 17:54:04 2001
--- OpenQuicktime.new/videoplugin/PHOTO_JPEG/codec_jpeg.c Sun Jan 13 15:22:22 2002
***************
*** 108,114 ****
}
/*************************************************************/
! /* Decoding function
/*************************************************************/
static int decode_JPEG(quicktime_t *file,
int track,
--- 108,114 ----
}
/*************************************************************/
! /* Decoding function */
/*************************************************************/
static int decode_JPEG(quicktime_t *file,
int track,
***************
*** 117,123 ****
unsigned char **output)
{
int width, width2, height;
! int i, j, k, r_h, r_v;
unsigned char *base[3];
Param *p = (Param*)(((quicktime_codec_t*)(file->vtracks[track].codec))->priv);
--- 117,123 ----
unsigned char **output)
{
int width, width2, height;
! int i, j, k, r_v;
unsigned char *base[3];
Param *p = (Param*)(((quicktime_codec_t*)(file->vtracks[track].codec))->priv);
***************
*** 133,139 ****
jpeg_read_header(&p->decinfo, TRUE);
- r_h = p->decinfo.cur_comp_info[0]->h_samp_factor;
r_v = p->decinfo.cur_comp_info[0]->v_samp_factor;
p->decinfo.do_fancy_upsampling = FALSE;
--- 133,138 ----
***************
*** 173,179 ****
/*************************************************************/
! /* Encoding function
/*************************************************************/
static int encode_JPEG(quicktime_t *file,
int track,
--- 172,178 ----
/*************************************************************/
! /* Encoding function */
/*************************************************************/
static int encode_JPEG(quicktime_t *file,
int track,
***************
*** 309,315 ****
/*************************************************************/
! /* Registering function
/*************************************************************/
int quicktime_codec_register(quicktime_extern_video_t *codec)
{
--- 308,314 ----
/*************************************************************/
! /* Registering function */
/*************************************************************/
int quicktime_codec_register(quicktime_extern_video_t *codec)
{
diff -r -c OpenQuicktime/videoplugin/XANIM/xanim_codec.c OpenQuicktime.new/videoplugin/XANIM/xanim_codec.c
*** OpenQuicktime/videoplugin/XANIM/xanim_codec.c Mon Oct 1 18:31:40 2001
--- OpenQuicktime.new/videoplugin/XANIM/xanim_codec.c Sun Jan 13 15:23:52 2002
***************
*** 97,103 ****
}
/*************************************************************/
! /* Decoding function
/*************************************************************/
static int decode_XANIM(quicktime_t *file,
int track,
--- 97,103 ----
}
/*************************************************************/
! /* Decoding function */
/*************************************************************/
static int decode_XANIM(quicktime_t *file,
int track,
***************
*** 127,133 ****
/*************************************************************/
! /* Encoding function
/*************************************************************/
static int encode_XANIM(quicktime_t *file,
int track,
--- 127,133 ----
/*************************************************************/
! /* Encoding function */
/*************************************************************/
static int encode_XANIM(quicktime_t *file,
int track,
***************
*** 156,164 ****
{
/* Here we go, now we support as many initializatin as you want ;) */
Param *p = NULL;
- int height = vtrack->track->tkhd.track_height;
- int width = vtrack->track->tkhd.track_width;
- int fourcc;
Initialised++;
--- 156,161 ----
***************
*** 215,221 ****
/*************************************************************/
! /* Registering function
/*************************************************************/
int quicktime_codec_register(quicktime_extern_video_t *codec)
{
--- 212,218 ----
/*************************************************************/
! /* Registering function */
/*************************************************************/
int quicktime_codec_register(quicktime_extern_video_t *codec)
{
diff -r -c OpenQuicktime/videoplugin/XANIM/xanim_legacy.c OpenQuicktime.new/videoplugin/XANIM/xanim_legacy.c
*** OpenQuicktime/videoplugin/XANIM/xanim_legacy.c Tue Jan 8 17:30:41 2002
--- OpenQuicktime.new/videoplugin/XANIM/xanim_legacy.c Sun Jan 13 15:27:18 2002
***************
*** 219,225 ****
/* probably not a good idea to modify the ENV data base */
path_buf = (char *)malloc( len + 1 );
! if (path_buf==0) return;
strcpy(path_buf, mod_path);
/* Also alloc a buffer so we can construct a full path later */
--- 219,225 ----
/* probably not a good idea to modify the ENV data base */
path_buf = (char *)malloc( len + 1 );
! if (path_buf==0) return NULL;
strcpy(path_buf, mod_path);
/* Also alloc a buffer so we can construct a full path later */
***************
*** 226,232 ****
/* name of module better not be more than 1024. we'll check later. */
dir_buf = (char *)malloc( len + 1024 + 1);
! if (dir_buf==0) { free(path_buf); return; }
dp = path_buf;
while( dp && *dp )
--- 226,232 ----
/* name of module better not be more than 1024. we'll check later. */
dir_buf = (char *)malloc( len + 1024 + 1);
! if (dir_buf==0) { free(path_buf); return NULL; }
dp = path_buf;
while( dp && *dp )
***************
*** 255,261 ****
char *end_of_dir;
int len;
! if (dir_name == 0) return;
fprintf(stderr,"dirname: %s\n", dir_name );
--- 255,261 ----
char *end_of_dir;
int len;
! if (dir_name == 0) return NULL;
fprintf(stderr,"dirname: %s\n", dir_name );
***************
*** 272,278 ****
*end_of_dir = 0;
dir = opendir( dir_name );
! if (dir == 0) return;
while( (dent = readdir( dir )) )
{
/* suppose I could do a stat to verify it's a file, oh screw it :) */
--- 272,278 ----
*end_of_dir = 0;
dir = opendir( dir_name );
! if (dir == 0) return NULL;
while( (dent = readdir( dir )) )
{
/* suppose I could do a stat to verify it's a file, oh screw it :) */
***************
*** 306,312 ****
handle = dlopen(fname,RTLD_NOW);
if (handle)
! { what_the = dlsym(handle, "What_The");
if ((error = dlerror()) != NULL)
{ fprintf(stderr,"dlsym failed on %s with %s\n",fname,error);
dlclose(handle);
--- 306,312 ----
handle = dlopen(fname,RTLD_NOW);
if (handle)
! { what_the = (XAVID_MOD_HDR *(*)())dlsym(handle, "What_The");
if ((error = dlerror()) != NULL)
{ fprintf(stderr,"dlsym failed on %s with %s\n",fname,error);
dlclose(handle);
***************
*** 313,320 ****
}
else
{ XAVID_MOD_HDR *mod_hdr = NULL;
- XAVID_FUNC_HDR *func;
- int i;
mod_hdr = what_the();
fprintf(stderr, "desc : %s\n", mod_hdr->desc);
--- 313,318 ----
|