diff mov.c @ 2006:2f0154760e5f libavformat

Get rid of unnecessary pointer casts. patch by Nicholas Tung, ntung ntung com
author diego
date Sun, 08 Apr 2007 20:24:16 +0000
parents 1a3c9056982a
children a3e79d6e4e3c
line wrap: on
line diff
--- a/mov.c	Sun Apr 08 20:21:11 2007 +0000
+++ b/mov.c	Sun Apr 08 20:24:16 2007 +0000
@@ -361,7 +361,7 @@
 static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 {
     AVStream *st = c->fc->streams[c->fc->nb_streams-1];
-    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;
+    MOVStreamContext *sc = st->priv_data;
     int tag, len;
 
     /* Well, broken but suffisant for some MP4 streams */
@@ -447,7 +447,7 @@
 static int mov_read_mdhd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 {
     AVStream *st = c->fc->streams[c->fc->nb_streams-1];
-    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;
+    MOVStreamContext *sc = st->priv_data;
     int version = get_byte(pb);
     int lang;
 
@@ -618,7 +618,7 @@
 static int mov_read_stco(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 {
     AVStream *st = c->fc->streams[c->fc->nb_streams-1];
-    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;
+    MOVStreamContext *sc = st->priv_data;
     unsigned int i, entries;
 
     get_byte(pb); /* version */
@@ -650,7 +650,7 @@
 static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 {
     AVStream *st = c->fc->streams[c->fc->nb_streams-1];
-    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;
+    MOVStreamContext *sc = st->priv_data;
     int entries, frames_per_sample;
     uint32_t format;
     uint8_t codec_name[32];
@@ -939,7 +939,7 @@
 static int mov_read_stsc(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 {
     AVStream *st = c->fc->streams[c->fc->nb_streams-1];
-    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;
+    MOVStreamContext *sc = st->priv_data;
     unsigned int i, entries;
 
     get_byte(pb); /* version */
@@ -968,7 +968,7 @@
 static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 {
     AVStream *st = c->fc->streams[c->fc->nb_streams-1];
-    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;
+    MOVStreamContext *sc = st->priv_data;
     unsigned int i, entries;
 
     get_byte(pb); /* version */
@@ -998,7 +998,7 @@
 static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 {
     AVStream *st = c->fc->streams[c->fc->nb_streams-1];
-    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;
+    MOVStreamContext *sc = st->priv_data;
     unsigned int i, entries, sample_size;
 
     get_byte(pb); /* version */
@@ -1033,7 +1033,7 @@
 static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 {
     AVStream *st = c->fc->streams[c->fc->nb_streams-1];
-    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;
+    MOVStreamContext *sc = st->priv_data;
     unsigned int i, entries;
     int64_t duration=0;
     int64_t total_sample_count=0;
@@ -1079,7 +1079,7 @@
 static int mov_read_ctts(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 {
     AVStream *st = c->fc->streams[c->fc->nb_streams-1];
-    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;
+    MOVStreamContext *sc = st->priv_data;
     unsigned int i, entries;
 
     get_byte(pb); /* version */
@@ -1471,7 +1471,7 @@
 
 static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
-    MOVContext *mov = (MOVContext *) s->priv_data;
+    MOVContext *mov = s->priv_data;
     ByteIOContext *pb = &s->pb;
     int i, err;
     MOV_atom_t atom = { 0, 0, 0 };
@@ -1664,7 +1664,7 @@
 static int mov_read_close(AVFormatContext *s)
 {
     int i;
-    MOVContext *mov = (MOVContext *) s->priv_data;
+    MOVContext *mov = s->priv_data;
     for(i=0; i<mov->total_streams; i++)
         mov_free_stream_context(mov->streams[i]);
     /* free color tabs */