[FFmpeg-devel] [PATCH] avformat: disable seeking on FIFOs/named pipes
Martin Sliwka
martin.sliwka at gmail.com
Fri Jun 29 12:58:19 CEST 2012
Dne 28.6.2012 19:31, Martin Sliwka napsal(a):
> Patch is addition to my previous patch
> (https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2012-June/051590.html)
> and disables seeking on FIFOs/named pipes by setting
> URLContext::is_streamed (same as pipe: protocol does for stdin/stdout
> pipes)
>
> Martin Sliwka
>
> ---
> libavformat/file.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/libavformat/file.c b/libavformat/file.c
> index 0c566c9..3752326 100644
> --- a/libavformat/file.c
> +++ b/libavformat/file.c
> @@ -89,6 +89,10 @@ static int file_open(URLContext *h, const char
> *filename, int flags)
> if (fd == -1)
> return AVERROR(errno);
> h->priv_data = (void *) (intptr_t) fd;
> +
> + struct stat st;
> + h->is_streamed = (0==fstat(fd, &st) && S_ISFIFO(st.st_mode)) ? 1
> : 0;
> +
> return 0;
> }
> .
> --.
> 1.7.4.1
>
Oh, I forgot to add that this patch was created to solve
http://ffmpeg.org/trac/ffmpeg/ticket/986
Martin
More information about the ffmpeg-devel
mailing list