[vlc-commits] prefetch: set callbacks just once

Rémi Denis-Courmont git at videolan.org
Wed Jun 19 20:12:50 CEST 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jun 18 18:46:03 2019 +0300| [7fc5228d27bf988d6440f8a039932fb473625f33] | committer: Rémi Denis-Courmont

prefetch: set callbacks just once

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7fc5228d27bf988d6440f8a039932fb473625f33
---

 modules/stream_filter/prefetch.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/modules/stream_filter/prefetch.c b/modules/stream_filter/prefetch.c
index b5afdffcec..087204ff99 100644
--- a/modules/stream_filter/prefetch.c
+++ b/modules/stream_filter/prefetch.c
@@ -450,10 +450,6 @@ static int Open(vlc_object_t *obj)
     if (unlikely(sys == NULL))
         return VLC_ENOMEM;
 
-    stream->pf_read = Read;
-    stream->pf_seek = Seek;
-    stream->pf_control = Control;
-
     vlc_stream_Control(stream->s, STREAM_CAN_SEEK, &sys->can_seek);
     vlc_stream_Control(stream->s, STREAM_CAN_PAUSE, &sys->can_pause);
     vlc_stream_Control(stream->s, STREAM_CAN_CONTROL_PACE, &sys->can_pace);
@@ -506,6 +502,7 @@ static int Open(vlc_object_t *obj)
 
     msg_Dbg(stream, "using %zu bytes buffer", sys->buffer_size);
     stream->pf_read = Read;
+    stream->pf_seek = Seek;
     stream->pf_control = Control;
     return VLC_SUCCESS;
 



More information about the vlc-commits mailing list