diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-12-06 00:08:37 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-12-06 00:08:37 +0000 |
commit | f9a35124a7b4bde1898727b52c3bc62587ff1505 (patch) | |
tree | 91432eed3b6807027c652646fed157bf1eb64c35 /libavformat | |
parent | e7ddb0cf4c02089486ba72e4fe94ec6a4e299738 (diff) | |
download | ffmpeg-f9a35124a7b4bde1898727b52c3bc62587ff1505.tar.gz |
fixing pipe seek bug
Originally committed as revision 3730 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/file.c | 1 | ||||
-rw-r--r-- | libavformat/utils.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/file.c b/libavformat/file.c index f7329e7923..fc75ee015c 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -107,6 +107,7 @@ static int pipe_open(URLContext *h, const char *filename, int flags) setmode(fd, O_BINARY); #endif h->priv_data = (void *)(size_t)fd; + h->is_streamed = 1; return 0; } diff --git a/libavformat/utils.c b/libavformat/utils.c index ddfaddeefe..5b17c64b90 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1617,7 +1617,7 @@ static void av_estimate_timings(AVFormatContext *ic) } ic->file_size = file_size; - if (ic->iformat == &mpegps_demux) { + if (ic->iformat == &mpegps_demux && file_size && !ic->pb.is_streamed) { /* get accurate estimate from the PTSes */ av_estimate_timings_from_pts(ic); } else if (av_has_timings(ic)) { |