comparison stream/stream.c @ 33722:5e80ff193bc2

Reindent, add empty lines.
author reimar
date Mon, 04 Jul 2011 19:23:03 +0000
parents 1bb847d89fd5
children 3c172a874b4b
comparison
equal deleted inserted replaced
33721:1bb847d89fd5 33722:5e80ff193bc2
314 goto eof_out; 314 goto eof_out;
315 // dvdnav has some horrible hacks to "suspend" reads, 315 // dvdnav has some horrible hacks to "suspend" reads,
316 // we need to skip this code or seeks will hang. 316 // we need to skip this code or seeks will hang.
317 if (s->type == STREAMTYPE_DVDNAV) 317 if (s->type == STREAMTYPE_DVDNAV)
318 goto eof_out; 318 goto eof_out;
319 // just in case this is an error e.g. due to network 319
320 // timeout reset and retry 320 // just in case this is an error e.g. due to network
321 // Seeking is used as a hack to make network streams 321 // timeout reset and retry
322 // reopen the connection, ideally they would implement 322 // Seeking is used as a hack to make network streams
323 // e.g. a STREAM_CTRL_RECONNECT to do this 323 // reopen the connection, ideally they would implement
324 s->eof=1; 324 // e.g. a STREAM_CTRL_RECONNECT to do this
325 stream_reset(s); 325 s->eof=1;
326 stream_reset(s);
326 if (stream_seek_internal(s, pos) >= 0 || s->pos != pos) // seek failed 327 if (stream_seek_internal(s, pos) >= 0 || s->pos != pos) // seek failed
327 goto eof_out; 328 goto eof_out;
328 // make sure EOF is set to ensure no endless loops 329 // make sure EOF is set to ensure no endless loops
329 s->eof=1; 330 s->eof=1;
330 return stream_read_internal(s, buf, orig_len); 331 return stream_read_internal(s, buf, orig_len);
332
331 eof_out: 333 eof_out:
332 s->eof=1; 334 s->eof=1;
333 return 0; 335 return 0;
334 } 336 }
335 // When reading succeeded we are obviously not at eof. 337 // When reading succeeded we are obviously not at eof.