[NUT-devel] [nut]: r240 - trunk/libnut/demuxer.c
ods15
subversion at mplayerhq.hu
Sat Nov 18 16:11:23 CET 2006
Author: ods15
Date: Sat Nov 18 16:11:23 2006
New Revision: 240
Modified:
trunk/libnut/demuxer.c
Log:
some fixes, report if index was read, don't read it again, and don't infinite loop when reaching EOF...
Modified: trunk/libnut/demuxer.c
==============================================================================
--- trunk/libnut/demuxer.c (original)
+++ trunk/libnut/demuxer.c Sat Nov 18 16:11:23 2006
@@ -750,7 +750,7 @@
}
// failure
- if (len == -1 && (nut->before_seek += read_data) < 512*1024) {
+ if (len == -1 && (nut->before_seek += read_data) < 512*1024 && read_data > 0) {
nut->i->buf_ptr -= 7; // rewind 7 bytes, try again
flush_buf(nut->i);
return find_main_headers(nut);
@@ -889,8 +889,9 @@
memset(&nut->info[nut->info_count - 1], 0, sizeof(nut_info_packet_t));
CHECK(get_info_header(nut, &nut->info[nut->info_count - 1]));
nut->info[nut->info_count].count = -1;
- } else if (tmp == INDEX_STARTCODE && nut->dopts.read_index) {
+ } else if (tmp == INDEX_STARTCODE && nut->dopts.read_index&1) {
CHECK(get_index(nut)); // usually you don't care about get_index() errors, but nothing except a memory error can happen here
+ nut->dopts.read_index = 2;
} else {
CHECK(get_header(nut->i, NULL));
}
More information about the NUT-devel
mailing list