changeset 2842:bc317b8d7090 libavformat

remove double check of pb->read_seek
author aurel
date Thu, 20 Dec 2007 00:25:18 +0000
parents a41a1ec2213c
children 7a6b7595f933
files asf.c utils.c
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/asf.c	Wed Dec 19 23:26:18 2007 +0000
+++ b/asf.c	Thu Dec 20 00:25:18 2007 +0000
@@ -1050,10 +1050,11 @@
         return -1;
 
     /* Try using the protocol's read_seek if available */
-    if(s->pb && s->pb->read_seek) {
+    if(s->pb) {
         int ret = av_url_read_fseek(s->pb, stream_index, pts, flags);
         if(ret >= 0)
             asf_reset_header(s);
+        if (ret != AVERROR(ENOSYS))
         return ret;
     }
 
--- a/utils.c	Wed Dec 19 23:26:18 2007 +0000
+++ b/utils.c	Thu Dec 20 00:25:18 2007 +0000
@@ -2042,7 +2042,7 @@
 {
     if (s->iformat->read_play)
         return s->iformat->read_play(s);
-    if (s->pb && s->pb->read_pause)
+    if (s->pb)
         return av_url_read_fpause(s->pb, 0);
     return AVERROR(ENOSYS);
 }
@@ -2051,7 +2051,7 @@
 {
     if (s->iformat->read_pause)
         return s->iformat->read_pause(s);
-    if (s->pb && s->pb->read_pause)
+    if (s->pb)
         return av_url_read_fpause(s->pb, 1);
     return AVERROR(ENOSYS);
 }