aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorBjörn Axelsson <gecko@acc.umu.se>2007-12-17 09:28:46 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2007-12-17 09:28:46 +0000
commitfa13095a5db7c1eb9b04e3adaf95423819fa62b0 (patch)
treecfedacbcfd24b553f4fba5df9883a3069790c963 /libavformat/utils.c
parent08c015c075e4318acca01130896120d2aed4cead (diff)
downloadffmpeg-fa13095a5db7c1eb9b04e3adaf95423819fa62b0.tar.gz
Enable av_read_pause(), av_read_play() and the ASF demuxer's av_read_seek()
to use the protocol-native functionality if available. Patch by Björn Axelsson: bjorn point axelsson at intinor dot se Original thread: [FFmpeg-devel] [PATCH][4/4] Enable use of the extended API Date: Thu Nov 22 16:01:06 CET 2007 Originally committed as revision 11248 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3cd07552c5..7ab8d7e1e6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2030,16 +2030,20 @@ int av_find_stream_info(AVFormatContext *ic)
int av_read_play(AVFormatContext *s)
{
- if (!s->iformat->read_play)
- return AVERROR(ENOSYS);
- return s->iformat->read_play(s);
+ if (s->iformat->read_play)
+ return s->iformat->read_play(s);
+ if (s->pb && s->pb->read_play)
+ return av_url_read_fplay(s->pb);
+ return AVERROR(ENOSYS);
}
int av_read_pause(AVFormatContext *s)
{
- if (!s->iformat->read_pause)
- return AVERROR(ENOSYS);
- return s->iformat->read_pause(s);
+ if (s->iformat->read_pause)
+ return s->iformat->read_pause(s);
+ if (s->pb && s->pb->read_pause)
+ return av_url_read_fpause(s->pb);
+ return AVERROR(ENOSYS);
}
void av_close_input_file(AVFormatContext *s)