aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-04-21 18:37:10 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-04-21 18:37:10 +0000
commit1c02d96f6da5a3df2c0cab6c1f4513704978591d (patch)
tree055898daf62d024b01f7a74bcfa5f7c16d342680
parent9e40addd21bcedf7b36e8a49b0a5cfac75ce5054 (diff)
downloadffmpeg-1c02d96f6da5a3df2c0cab6c1f4513704978591d.tar.gz
long -> int
Originally committed as revision 8774 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mov.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 8d64db16a5..0dd8824e62 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -72,9 +72,9 @@
*/
typedef struct MOV_sample_to_chunk_tbl {
- long first;
- long count;
- long id;
+ int first;
+ int count;
+ int id;
} MOV_sample_to_chunk_tbl;
typedef struct {
@@ -92,7 +92,7 @@ struct MOVParseTableEntry;
typedef struct MOVStreamContext {
int ffindex; /* the ffmpeg stream id */
- long next_chunk;
+ int next_chunk;
unsigned int chunk_count;
int64_t *chunk_offsets;
unsigned int stts_count;
@@ -106,12 +106,12 @@ typedef struct MOVStreamContext {
int sample_to_ctime_sample;
unsigned int sample_size;
unsigned int sample_count;
- long *sample_sizes;
+ int *sample_sizes;
unsigned int keyframe_count;
- long *keyframes;
+ int *keyframes;
int time_scale;
int time_rate;
- long current_sample;
+ int current_sample;
unsigned int bytes_per_frame;
unsigned int samples_per_frame;
int dv_audio_container;
@@ -229,7 +229,7 @@ static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
ctype = get_le32(pb);
type = get_le32(pb); /* component subtype */
- dprintf(c->fc, "ctype= %c%c%c%c (0x%08lx)\n", *((char *)&ctype), ((char *)&ctype)[1], ((char *)&ctype)[2], ((char *)&ctype)[3], (long) ctype);
+ dprintf(c->fc, "ctype= %c%c%c%c (0x%08x)\n", *((char *)&ctype), ((char *)&ctype)[1], ((char *)&ctype)[2], ((char *)&ctype)[3], (int) ctype);
dprintf(c->fc, "stype= %c%c%c%c\n", *((char *)&type), ((char *)&type)[1], ((char *)&type)[2], ((char *)&type)[3]);
if(!ctype)
c->isom = 1;
@@ -897,20 +897,20 @@ static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
entries = get_be32(pb);
- if(entries >= UINT_MAX / sizeof(long))
+ if(entries >= UINT_MAX / sizeof(int))
return -1;
sc->keyframe_count = entries;
#ifdef DEBUG
av_log(NULL, AV_LOG_DEBUG, "keyframe_count = %d\n", sc->keyframe_count);
#endif
- sc->keyframes = av_malloc(entries * sizeof(long));
+ sc->keyframes = av_malloc(entries * sizeof(int));
if (!sc->keyframes)
return -1;
for(i=0; i<entries; i++) {
sc->keyframes[i] = get_be32(pb);
#ifdef DEBUG
-/* av_log(NULL, AV_LOG_DEBUG, "keyframes[]=%ld\n", sc->keyframes[i]); */
+/* av_log(NULL, AV_LOG_DEBUG, "keyframes[]=%d\n", sc->keyframes[i]); */
#endif
}
return 0;
@@ -929,7 +929,7 @@ static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
if (!sc->sample_size) /* do not overwrite value computed in stsd */
sc->sample_size = sample_size;
entries = get_be32(pb);
- if(entries >= UINT_MAX / sizeof(long))
+ if(entries >= UINT_MAX / sizeof(int))
return -1;
sc->sample_count = entries;
@@ -939,13 +939,13 @@ static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
#ifdef DEBUG
av_log(NULL, AV_LOG_DEBUG, "sample_size = %d sample_count = %d\n", sc->sample_size, sc->sample_count);
#endif
- sc->sample_sizes = av_malloc(entries * sizeof(long));
+ sc->sample_sizes = av_malloc(entries * sizeof(int));
if (!sc->sample_sizes)
return -1;
for(i=0; i<entries; i++) {
sc->sample_sizes[i] = get_be32(pb);
#ifdef DEBUG
- av_log(NULL, AV_LOG_DEBUG, "sample_sizes[]=%ld\n", sc->sample_sizes[i]);
+ av_log(NULL, AV_LOG_DEBUG, "sample_sizes[]=%d\n", sc->sample_sizes[i]);
#endif
}
return 0;
@@ -1473,7 +1473,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
AVIndexEntry *current_sample = &s->streams[i]->index_entries[msc->current_sample];
int64_t dts = av_rescale(current_sample->timestamp * (int64_t)msc->time_rate, AV_TIME_BASE, msc->time_scale);
- dprintf(s, "stream %d, sample %ld, dts %"PRId64"\n", i, msc->current_sample, dts);
+ dprintf(s, "stream %d, sample %d, dts %"PRId64"\n", i, msc->current_sample, dts);
if (dts < best_dts) {
sample = current_sample;
best_dts = dts;
@@ -1536,7 +1536,7 @@ static int mov_seek_stream(AVStream *st, int64_t timestamp, int flags)
if (sample < 0) /* not sure what to do */
return -1;
sc->current_sample = sample;
- dprintf(st->codec, "stream %d, found sample %ld\n", st->index, sc->current_sample);
+ dprintf(st->codec, "stream %d, found sample %d\n", st->index, sc->current_sample);
/* adjust ctts index */
if (sc->ctts_data) {
time_sample = 0;