[FFmpeg-devel] [PATCH] rmenc.c: remove index writing

Ronald S. Bultje rsbultje
Sat Mar 21 17:52:29 CET 2009


Hi,

index writing in rmenc.c is broken:
- it is always empty
- it writes a single index chunk for all streams, instead of one per
stream (see warning for b-libav.rm in testsuite)

Attached patch removes it so it can at some point be added correctly.

Ronald
-------------- next part --------------
Index: ffmpeg-svn/libavformat/rmenc.c
===================================================================
--- ffmpeg-svn.orig/libavformat/rmenc.c	2009-02-21 09:39:45.000000000 -0500
+++ ffmpeg-svn/libavformat/rmenc.c	2009-03-21 12:39:20.000000000 -0400
@@ -425,16 +425,8 @@
         index_pos = url_fseek(pb, 0, SEEK_CUR);
         data_size = index_pos - rm->data_pos;
 
-        /* index */
-        put_tag(pb, "INDX");
-        put_be32(pb, 10 + 10 * s->nb_streams);
-        put_be16(pb, 0);
+        /* FIXME: write index */
 
-        for(i=0;i<s->nb_streams;i++) {
-            put_be32(pb, 0); /* zero indexes */
-            put_be16(pb, i); /* stream number */
-            put_be32(pb, 0); /* next index */
-        }
         /* undocumented end header */
         put_be32(pb, 0);
         put_be32(pb, 0);
@@ -442,7 +434,7 @@
         url_fseek(pb, 0, SEEK_SET);
         for(i=0;i<s->nb_streams;i++)
             rm->streams[i].total_frames = rm->streams[i].nb_frames;
-        rv10_write_header(s, data_size, index_pos);
+        rv10_write_header(s, data_size, 0);
     } else {
         /* undocumented end header */
         put_be32(pb, 0);
Index: ffmpeg-svn/tests/ffmpeg.regression.ref
===================================================================
--- ffmpeg-svn.orig/tests/ffmpeg.regression.ref	2009-02-05 17:26:06.000000000 -0500
+++ ffmpeg-svn/tests/ffmpeg.regression.ref	2009-03-21 12:50:20.000000000 -0400
@@ -118,12 +118,12 @@
 9086168 ./tests/data/a-jpegls.avi
 012717e7c928641410eaa6abaf126fdc *./tests/data/jpegls.vsynth.out.yuv
 stddev:    2.84 PSNR: 39.05 bytes:  7603200/  7603200
-99ef24bf57718fd29a7a91b22af2b3fe *./tests/data/a-rv10.rm
-667935 ./tests/data/a-rv10.rm
+1cc26cf6711df770e81bcfce36f28011 *./tests/data/a-rv10.rm
+  667915 ./tests/data/a-rv10.rm
 d507be4253a9c8211a3738c58ba28118 *./tests/data/rv10.vsynth.out.yuv
 stddev:    8.06 PSNR: 29.99 bytes:  7603200/  7603200
-d1caf150a7b53db8fd5eb8c1d0701daf *./tests/data/a-rv20.rm
-640876 ./tests/data/a-rv20.rm
+02f1ec304a066c3bfb355adbdf4c5977 *./tests/data/a-rv20.rm
+  640856 ./tests/data/a-rv20.rm
 297dc46da1a256c0a97158c036c30c7f *./tests/data/rv20.vsynth.out.yuv
 stddev:    8.26 PSNR: 29.77 bytes:  7603200/  7603200
 d13292f4583618d1b7b525a9ee010dff *./tests/data/a-asv1.avi
@@ -175,8 +175,8 @@
 83f8df5d5f84480566af548bb037fceb *./tests/data/mp2.vsynth.out.wav
 stddev: 9328.41 PSNR: 16.92 bytes:  1055276/  1058444
 stddev: 4394.71 PSNR: 23.46 bytes:  1053352/  1058444
-aefe11ab5067621a1c674859d6413891 *./tests/data/a-ac3.rm
-98203 ./tests/data/a-ac3.rm
+3bfe347421de458dbfe572b8d4047b46 *./tests/data/a-ac3.rm
+   98183 ./tests/data/a-ac3.rm
 39878597b1d65cce473639a7d8c93b02 *./tests/data/a-g726.wav
 24279 ./tests/data/a-g726.wav
 888f2f016e608d044a1bacbca5497ed2 *./tests/data/g726.vsynth.out.wav



More information about the ffmpeg-devel mailing list