[MPlayer-dev-eng] Patches for NUT

Oded Shimon ods15 at ods15.dyndns.org
Sat Feb 11 08:45:58 CET 2006


On Sat, Feb 11, 2006 at 02:47:49AM -0500, Rich Felker wrote:
> On Sat, Feb 11, 2006 at 07:59:57AM +0200, Oded Shimon wrote:
> > > > One more issue - now that index does not mark EOF as it can appear 
> > > > anywhere, the index_ptr comes out of nowhere, the demuxer can even mistake 
> > > > it for being a frame startcode (It could even appear as a NUT startcode!).
> > > > So I suggest making a end_startcode before the index_ptr...
> > > 
> > > just put index_ptr into the index, right before the checksum
> > 
> > That's.. a bit odd... Will all indexes have an index_ptr? Or only the one 
> > at EOF?
> 
> For simplicity, all should. All copies of the index should be
> binary-identical anyway, so if the index_ptr is part of the index
> packet, it must always be there.
> 
> > Also it makes it impossible to add reserved bytes in the index.
> 
> No it doesn't. The additional space just goes before the index_ptr
> rather than after it.

Yeah I realized this after I sent the mail by looking at the spec..

So, how is this patch. Can I commit?

- ods15
-------------- next part --------------
Index: DOCS/tech/mpcf.txt
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/tech/mpcf.txt,v
retrieving revision 1.101
diff -u -r1.101 mpcf.txt
--- DOCS/tech/mpcf.txt	10 Feb 2006 10:42:40 -0000	1.101
+++ DOCS/tech/mpcf.txt	11 Feb 2006 07:45:50 -0000
@@ -262,6 +262,7 @@
         }
     }
     reserved_bytes
+    index_ptr                           u(64)
     checksum                            u(32)
 
 info_frame: (optional)
@@ -322,9 +323,6 @@
             frame
         }
     }
-    if (has_index){
-        index_ptr                       u(64)
-    }
 
 
 Tag description:
@@ -597,10 +595,11 @@
     that EOR. EOR is unset by the first keyframe after it.
 
 index_ptr
-    Length in bytes from the first byte of the index startcode to the first
-    byte of the index_ptr. If there is no index, index_ptr MUST NOT be
-    written. If there are several indexes, index_ptr MUST point to the last
-    index.
+    Length in bytes of the entire index, from the first byte of the
+    startcode until the last byte of the checksum.
+    Note: A demuxer can use this to find the index when it is written at
+    EOF, as index_ptr will always be 12 bytes before the end of file if
+    there is an index at all.
 
 id
     the ID of the type/name pair, so it is more compact


More information about the MPlayer-dev-eng mailing list