[NUT-devel] [NUT] (ods15): r69 - /trunk/libnut/demuxer.c

syncmail at mplayerhq.hu syncmail at mplayerhq.hu
Sat Feb 25 11:07:45 CET 2006


Author: ods15
Date: Sat Feb 25 11:07:45 2006
New Revision: 69

Log:
support for reading index immediately after headers

Modified:
    trunk/libnut/demuxer.c

Modified: trunk/libnut/demuxer.c
==============================================================================
--- trunk/libnut/demuxer.c (original)
+++ trunk/libnut/demuxer.c Sat Feb 25 11:07:45 2006
@@ -732,6 +732,18 @@
 					nut->sc[i].pts_cache[j] = -1;
 			}
 		}
+		if (nut->dopts.read_index) {
+			off_t pos = bctello(nut->i);
+			uint64_t tmp;
+			CHECK(get_bytes(nut->i, 8, &tmp));
+			if (tmp == INDEX_STARTCODE) {
+				GET_V(nut->i, tmp);
+				nut->before_seek = bctello(nut->i) + tmp;
+				nut->seek_status = 2;
+			}
+			nut->i->buf_ptr -= bctello(nut->i) - pos;
+			flush_buf(nut->i);
+		}
 		nut->last_headers = 1;
 	}
 




More information about the NUT-devel mailing list