[Ffmpeg-devel] Patch DURATION_MAX_READ_SIZE in lavf/utils.c
Fri Sep 2 22:31:21 CEST 2005
Fred Rothganger <rothgang at uiuc.edu> writes:
>>i think you should add a comment to the #define so the reader knows why
>>its the value it is
>>making it user setable would be interrsting too ...
> Here's another attempt.
> -- Fred
> Index: utils.c
> RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/utils.c,v
> retrieving revision 1.164
> diff -u -r1.164 utils.c
> --- utils.c 15 Aug 2005 15:58:21 -0000 1.164
> +++ utils.c 2 Sep 2005 20:01:27 -0000
> @@ -1613,7 +1613,13 @@
> -#define DURATION_MAX_READ_SIZE 250000
> + The following constant limits how many bytes to read at the beginning
> + and end of an MPEG file while searching for PTS info. The number should
> + be large enough so that at least one packet (having a PTS) of each stream
> + will be seen at each end of the file.
> + */
> +#define DURATION_MAX_READ_SIZE 500000
FWIW, an MP at ML MPEG2 video (max 15Mbps) can have as many as 1312500
bytes of elementary stream data between PTS values, not counting PS/TS
overhead. Of course, if an audio stream is present, PTS values will
be much more frequent (in terms of byte position).
mru at inprovide.com
More information about the ffmpeg-devel