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

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun May 22 09:03:02 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
9a0b28b1 by Francois Cartegnie at 2022-05-22T08:38:22+00:00
demux: ogg: fix non fastseek lookup issues with small files

- - - - -


1 changed file:

- modules/demux/oggseek.c


Changes:

=====================================
modules/demux/oggseek.c
=====================================
@@ -49,6 +49,7 @@
 #define SEGMENT_NOT_FOUND -1
 
 #define MAX_PAGE_SIZE 65307
+#define MIN_PAGE_SIZE 27
 typedef struct packetStartCoordinates
 {
     int64_t i_pos;
@@ -862,7 +863,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/9a0b28b1894f60c81d3abfd52babd40f4dec21b9

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9a0b28b1894f60c81d3abfd52babd40f4dec21b9
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