comparison utils.c @ 127:b7ce3b3dc171 libavformat

VOB stream patch ba (Brian Foley <bfoley at compsoc dot nuigalway dot ie>)
author michaelni
date Mon, 05 May 2003 20:47:23 +0000
parents 27d6df9208d4
children 35386fc4d47d
comparison
equal deleted inserted replaced
126:23f62139c013 127:b7ce3b3dc171
473 short samples[AVCODEC_MAX_AUDIO_FRAME_SIZE / 2]; 473 short samples[AVCODEC_MAX_AUDIO_FRAME_SIZE / 2];
474 uint8_t *ptr; 474 uint8_t *ptr;
475 int min_read_size, max_read_size; 475 int min_read_size, max_read_size;
476 476
477 /* typical mpeg ts rate is 40 Mbits. DVD rate is about 10 477 /* typical mpeg ts rate is 40 Mbits. DVD rate is about 10
478 Mbits. We read at most 0.1 second of file to find all streams */ 478 Mbits. We read at most 0.2 second of file to find all streams */
479 479
480 /* XXX: base it on stream bitrate when possible */ 480 /* XXX: base it on stream bitrate when possible */
481 if (ic->iformat == &mpegts_demux) { 481 if (ic->iformat == &mpegts_demux) {
482 /* maximum number of bytes we accept to read to find all the streams 482 /* maximum number of bytes we accept to read to find all the streams
483 in a file */ 483 in a file */
484 min_read_size = 3000000; 484 min_read_size = 6000000;
485 } else { 485 } else {
486 min_read_size = 125000; 486 min_read_size = 250000;
487 } 487 }
488 /* max read size is 2 seconds of video max */ 488 /* max read size is 2 seconds of video max */
489 max_read_size = min_read_size * 20; 489 max_read_size = min_read_size * 10;
490 490
491 /* set initial codec state */ 491 /* set initial codec state */
492 for(i=0;i<ic->nb_streams;i++) { 492 for(i=0;i<ic->nb_streams;i++) {
493 st = ic->streams[i]; 493 st = ic->streams[i];
494 if (has_codec_parameters(&st->codec)) 494 if (has_codec_parameters(&st->codec))