[vlc-commits] [Git][videolan/vlc][3.0.x] demux: ogg: fix non fastseek lookup issues with small files

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Thu May 26 10:23:12 UTC 2022



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
bddfcc9a by Francois Cartegnie at 2022-05-26T10:08:28+00:00
demux: ogg: fix non fastseek lookup issues with small files

(cherry picked from commit 9a0b28b1894f60c81d3abfd52babd40f4dec21b9)

- - - - -


1 changed file:

- modules/demux/oggseek.c


Changes:

=====================================
modules/demux/oggseek.c
=====================================
@@ -48,6 +48,7 @@
 #define SEGMENT_NOT_FOUND -1
 
 #define MAX_PAGE_SIZE 65307
+#define MIN_PAGE_SIZE 27
 typedef struct packetStartCoordinates
 {
     int64_t i_pos;
@@ -980,7 +981,7 @@ int Oggseek_BlindSeektoPosition( demux_t *p_demux, logical_stream_t *p_stream,
     {
         /* Otherwise, we just sync to the next keyframe we meet */
         i_pagepos = OggForwardSeekToFrame( p_demux,
-                __MAX ( i_size - MAX_PAGE_SIZE, p_stream->i_data_start ),
+                __MAX ( i_size - MIN_PAGE_SIZE, p_stream->i_data_start ),
                 stream_Size( p_demux->s ),
                 p_stream, i_granule, false );
     }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bddfcc9a582573c89025e6e048461ae62d2a14e9

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bddfcc9a582573c89025e6e048461ae62d2a14e9
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list