[FFmpeg-devel] [PATCH] Never shrink the buffer in ff_rewind_with_probe_data
Martin Storsjö
martin
Sat Jul 24 11:07:34 CEST 2010
On Sat, 24 Jul 2010, Michael Niedermayer wrote:
> On Fri, Jul 23, 2010 at 11:49:05AM +0300, Martin Storsj? wrote:
> > Hi,
> >
> > In ff_rewind_with_probe_data, if there is little unread data in the
> > ByteIOContext buffer (e.g. when reading over a network where less data
> > than requested may be returned in fill_buffer()), this may lead to
> > reducing the size of the ByteIOContext buffer to little more the probe
> > data size. This can lead to suboptimal aviobuf behaviour, e.g. making some
> > demuxers fail to do short seeks backwards (if the input isn't seekable).
> >
> > This makes the mpegts demuxer work when probed over non-seekable http.
> >
> > // Martin
> > aviobuf.c | 11 +++++++----
> > 1 file changed, 7 insertions(+), 4 deletions(-)
> > d000557ba399835e737cfd74989598ddbcadf5a0 0002-Never-shrink-the-buffer-in-ff_rewind_with_probe_data.patch
> > From 41cfda5b9c2e10e2695537461252babd599e5b4f Mon Sep 17 00:00:00 2001
> > From: Martin Storsjo <martin at martin.st>
> > Date: Fri, 23 Jul 2010 10:56:31 +0300
> > Subject: [PATCH 2/2] Never shrink the buffer in ff_rewind_with_probe_data
> >
> > If there is little unread data in the ByteIOContext buffer, this may lead
> > to reducing the size of the ByteIOContext buffer to little more the probe
> > data size. This can lead to suboptimal aviobuf behaviour, e.g. making some
> > demuxers fail to do short seeks backwards (if the input isn't seekable).
>
> might be ok if tested
Yes, tested - applied.
// Martin
More information about the ffmpeg-devel
mailing list