]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avidec.c
nut needs crc.o
[ffmpeg] / libavformat / avidec.c
index 134652f3b02f40c8659317447aa42132a509c718..1c4ee6affeed1dc228f1fea7db25dbba5da55ac6 100644 (file)
@@ -19,6 +19,7 @@
 #include "avformat.h"
 #include "avi.h"
 #include "dv.h"
+#include "riff.h"
 
 #undef NDEBUG
 #include <assert.h>
@@ -137,10 +138,12 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){
                 ast->cum_len ++;
             last_pos= pos;
         }else{
-            int64_t offset= get_le64(pb);
-            int size      = get_le32(pb);
-            int duration  = get_le32(pb);
-            int64_t pos= url_ftell(pb);
+            int64_t offset, pos;
+            int duration;
+            offset = get_le64(pb);
+            get_le32(pb);       /* size */
+            duration = get_le32(pb);
+            pos = url_ftell(pb);
 
             url_fseek(pb, offset+8, SEEK_SET);
             read_braindead_odml_indx(s, frame_num);
@@ -186,7 +189,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
     unsigned int size, nb_frames;
     int i, n;
     AVStream *st;
-    AVIStream *ast;
+    AVIStream *ast = NULL;
     int xan_video = 0;  /* hack to support Xan A/V */
 
     avi->stream_index= -1;
@@ -921,7 +924,7 @@ static int avi_probe(AVProbeData *p)
         return 0;
 }
 
-static AVInputFormat avi_iformat = {
+AVInputFormat avi_demuxer = {
     "avi",
     "avi format",
     sizeof(AVIContext),
@@ -931,9 +934,3 @@ static AVInputFormat avi_iformat = {
     avi_read_close,
     avi_read_seek,
 };
-
-int avidec_init(void)
-{
-    av_register_input_format(&avi_iformat);
-    return 0;
-}