[FFmpeg-trac] #1235(avformat:new): ffio_limit does not work correctly with named pipes on OSX (Snow Leopard)
FFmpeg
trac at avcodec.org
Fri Apr 20 19:04:56 CEST 2012
#1235: ffio_limit does not work correctly with named pipes on OSX (Snow Leopard)
------------------------------------+------------------------------------
Reporter: ls | Owner:
Type: defect | Status: new
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Comment (by ls):
On OSX in ffio_limit `s->seekable` is 0 when process substitution is used
(ffmpeg reads from /dev/fd/xx) while on Linux `s->seekable` is 1.
Furthermore `s->maxsize` is always 16384 on OSX. I do not understand if
avio_size is supposed to work for non seekable streams. Currently I have
applied this:
{{{
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 1bf5ac5..a066cd7 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -276,7 +276,7 @@ AVInputFormat *av_find_input_format(const char
*short_name)
int ffio_limit(AVIOContext *s, int size)
{
- if(s->maxsize>=0){
+ if(s->maxsize>=0 && s->seekable){
int64_t remaining= s->maxsize - avio_tell(s);
if(remaining < size){
int64_t newsize= avio_size(s);
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1235#comment:1>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list