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)
Fixes Ticket986
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
{
int access;
int fd;
+ struct stat st;
av_strstart(filename, "file:", &filename);
if (fd == -1)
return AVERROR(errno);
h->priv_data = (void *) (intptr_t) fd;
+
+ h->is_streamed = (0==fstat(fd, &st) && S_ISFIFO(st.st_mode)) ? 1 : 0;
+
return 0;
}