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

Francois Cartegnie git at videolan.org
Tue Jan 2 15:13:55 CET 2018


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

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

(cherry picked from commit 2080dcb8e3aa936a0839c0ce5d85123f8170b875)
(cherry picked from commit b3f4cad5cf8645d5dcc41c685108d8e1c8876b85)

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

 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..fe2f07a8be 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->s, &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