[vlc-commits] stream_filter: skiptags: return truncated size (fix #19390)

Francois Cartegnie git at videolan.org
Tue Jan 2 15:32:37 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan  2 10:18:16 2018 +0100| [20c8edde31ff04ff4d0177da43901aa9985bb769] | committer: Francois Cartegnie

stream_filter: skiptags: return truncated size (fix #19390)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=20c8edde31ff04ff4d0177da43901aa9985bb769
---

 modules/stream_filter/skiptags.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/stream_filter/skiptags.c b/modules/stream_filter/skiptags.c
index b7479d3d35..caf9d63feb 100644
--- a/modules/stream_filter/skiptags.c
+++ b/modules/stream_filter/skiptags.c
@@ -178,6 +178,14 @@ static int Control(stream_t *stream, int query, va_list args)
         *va_arg( args, const block_t ** ) = sys->p_tags;
         return VLC_SUCCESS;
     }
+    else if(query == STREAM_GET_SIZE)
+    {
+        uint64_t size;
+        int i_ret = vlc_stream_GetSize(stream->p_source, &size);
+        if(i_ret == VLC_SUCCESS)
+            *va_arg(args, uint64_t *) = size - sys->header_skip;
+        return i_ret;
+    }
 
     return vlc_stream_vaControl(stream->p_source, query, args);
 }



More information about the vlc-commits mailing list