comparison ffm.c @ 390:3a40642dc4df libavformat

adjust_write_index() fix by ("Curi Fabio Eduardo (SFL)" <curif at TELEFONICA dot COM dot AR>)
author michael
date Thu, 18 Mar 2004 20:52:40 +0000
parents 54e915169d48
children 60f897e8dd2d
comparison
equal deleted inserted replaced
389:e14fcd57ad2f 390:3a40642dc4df
389 pts_start = get_pts(s, pos_min); 389 pts_start = get_pts(s, pos_min);
390 390
391 pts = get_pts(s, pos_max); 391 pts = get_pts(s, pos_max);
392 392
393 if (pts - 100000 > pts_start) 393 if (pts - 100000 > pts_start)
394 return; 394 goto end;
395 395
396 ffm->write_index = FFM_PACKET_SIZE; 396 ffm->write_index = FFM_PACKET_SIZE;
397 397
398 pts_start = get_pts(s, pos_min); 398 pts_start = get_pts(s, pos_min);
399 399
422 } 422 }
423 423
424 //printf("Adjusted write index from %lld to %lld: pts=%0.6f\n", orig_write_index, ffm->write_index, pts / 1000000.); 424 //printf("Adjusted write index from %lld to %lld: pts=%0.6f\n", orig_write_index, ffm->write_index, pts / 1000000.);
425 //printf("pts range %0.6f - %0.6f\n", get_pts(s, 0) / 1000000. , get_pts(s, ffm->file_size - 2 * FFM_PACKET_SIZE) / 1000000. ); 425 //printf("pts range %0.6f - %0.6f\n", get_pts(s, 0) / 1000000. , get_pts(s, ffm->file_size - 2 * FFM_PACKET_SIZE) / 1000000. );
426 426
427 end:
427 url_fseek(pb, ptr, SEEK_SET); 428 url_fseek(pb, ptr, SEEK_SET);
428 } 429 }
429 430
430 431
431 static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) 432 static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)