[FFmpeg-devel] [PATCH 6/8] add SRT muxer and demuxer
Michael Niedermayer
michaelni
Thu Jul 22 14:18:43 CEST 2010
On Wed, Jul 21, 2010 at 11:53:17AM +0200, Aurelien Jacobs wrote:
[...]
> +static int srt_read_packet(AVFormatContext *s, AVPacket *pkt)
> +{
> + char buffer[2048], *ptr = buffer, *ptr2 = ptr;
> + int64_t pos = url_ftell(s->pb);
> + int res = AVERROR_EOF;
> +
> + while (!is_eol(*ptr2) && !url_feof(s->pb) && ptr-buffer<sizeof(buffer)-1) {
that is_eol looks like its reading from uninited mem
> + ptr2 = ptr;
> + ptr += ff_get_line(s->pb, ptr, sizeof(buffer)+buffer-ptr);
> + }
besides why is ff_get_line() in a loop, i would naively have expected
a single call to work?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100722/195d941a/attachment.pgp>
More information about the ffmpeg-devel
mailing list