comparison utils.c @ 2827:f717dd23fc23 libavformat

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
author benoit
date Mon, 17 Dec 2007 09:28:46 +0000
parents 173b5cb7efde
children ff463ed64256
comparison
equal deleted inserted replaced
2826:24ad70087e67 2827:f717dd23fc23
2028 2028
2029 /*******************************************************/ 2029 /*******************************************************/
2030 2030
2031 int av_read_play(AVFormatContext *s) 2031 int av_read_play(AVFormatContext *s)
2032 { 2032 {
2033 if (!s->iformat->read_play) 2033 if (s->iformat->read_play)
2034 return AVERROR(ENOSYS); 2034 return s->iformat->read_play(s);
2035 return s->iformat->read_play(s); 2035 if (s->pb && s->pb->read_play)
2036 return av_url_read_fplay(s->pb);
2037 return AVERROR(ENOSYS);
2036 } 2038 }
2037 2039
2038 int av_read_pause(AVFormatContext *s) 2040 int av_read_pause(AVFormatContext *s)
2039 { 2041 {
2040 if (!s->iformat->read_pause) 2042 if (s->iformat->read_pause)
2041 return AVERROR(ENOSYS); 2043 return s->iformat->read_pause(s);
2042 return s->iformat->read_pause(s); 2044 if (s->pb && s->pb->read_pause)
2045 return av_url_read_fpause(s->pb);
2046 return AVERROR(ENOSYS);
2043 } 2047 }
2044 2048
2045 void av_close_input_file(AVFormatContext *s) 2049 void av_close_input_file(AVFormatContext *s)
2046 { 2050 {
2047 int i, must_open_file; 2051 int i, must_open_file;