Projects
Extra
vlc-beta
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 321
View file
_service:obs_scm:vlc-beta-20260423.fd0fbaeb7.obscpio/contrib/src/vorbis/0001-CMake-add-missing-libm-in-.pc-file-when-it-s-used.patch
Deleted
@@ -1,26 +0,0 @@ -From fac2505acea83d038bbe9e45c4504a6800c46726 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme <slhomme@matroska.org> -Date: Tue, 9 Jan 2024 09:19:41 +0100 -Subject: PATCH CMake: add missing libm in .pc file when it's used - ---- - CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 33f684f5..ea79c4aa 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -52,6 +52,9 @@ function(configure_pkg_config_file pkg_config_file_in) - set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) - set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) - set(VERSION ${PROJECT_VERSION}) -+ if(HAVE_LIBM) -+ set(VORBIS_LIBS "-lm") -+ endif() - string(REPLACE ".in" "" pkg_config_file ${pkg_config_file_in}) - configure_file(${pkg_config_file_in} ${pkg_config_file} @ONLY) - endfunction() --- -2.39.3 (Apple Git-145) -
View file
_service:obs_scm:vlc-beta-20260424.382296ba4.obscpio/contrib/src/vorbis/0001-Fix-pkgconfig-creation-with-cmake.patch
Added
@@ -0,0 +1,35 @@ +From 3c177d011684fce294edce5ea93f27d3453e6830 Mon Sep 17 00:00:00 2001 +From: Matt Oliver <protogonoi@gmail.com> +Date: Tue, 8 Sep 2020 21:12:54 +1000 +Subject: PATCH Fix pkgconfig creation with cmake. + +The cmake build script was not setting a VORBIS_LIBS variable +that is used to update pkg-config files. This results in linking +errors in downstream projects due to missing dependencies +(in this case libm). + +This patch just updates the cmake script to behave the same +as configure does currently. + +Signed-off-by: evpobr <evpobr@gmail.com> +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bb99e2cf..c42f6a5b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,6 +60,9 @@ message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}") + # Find math library + + check_library_exists(m floor "" HAVE_LIBM) ++if(HAVE_LIBM) ++ set(VORBIS_LIBS "-lm") ++endif() + + # Find ogg dependency + if(NOT TARGET Ogg::ogg) +-- +2.52.0.windows.1 +
View file
_service:obs_scm:vlc-beta-20260423.fd0fbaeb7.obscpio/contrib/src/vorbis/rules.mak -> _service:obs_scm:vlc-beta-20260424.382296ba4.obscpio/contrib/src/vorbis/rules.mak
Changed
@@ -27,7 +27,7 @@ libvorbis: libvorbis-$(VORBIS_VERSION).tar.xz .sum-vorbis $(UNPACK) - $(APPLY) $(SRC)/vorbis/0001-CMake-add-missing-libm-in-.pc-file-when-it-s-used.patch + $(APPLY) $(SRC)/vorbis/0001-Fix-pkgconfig-creation-with-cmake.patch $(call pkg_static,"vorbis.pc.in") $(call pkg_static,"vorbisenc.pc.in") $(call pkg_static,"vorbisfile.pc.in")
View file
_service:obs_scm:vlc-beta-20260423.fd0fbaeb7.obscpio/modules/demux/mp4/libmp4.c -> _service:obs_scm:vlc-beta-20260424.382296ba4.obscpio/modules/demux/mp4/libmp4.c
Changed
@@ -39,6 +39,8 @@ #include <limits.h> #include <stdckdint.h> +#define MP4_DEPTH_MAX 32 + /* Some assumptions: * The input method HAS to be seekable */ @@ -193,6 +195,14 @@ memcpy( p_uuid, p_buff, 16 ); } +static unsigned GetDepth( const MP4_Box_t *box ) +{ + unsigned i = 0; + for( ; box ; box = box->p_father ) + i++; + return i; +} + static video_palette_t * ReadQuicktimePalette( uint8_t **pp_peek, uint64_t *pi_read ) { uint8_t *p_peek = *pp_peek; @@ -537,6 +547,9 @@ return 0; } + if( GetDepth( p_container ) > MP4_DEPTH_MAX ) /* Prevent unbounded recursions */ + return 1; + uint64_t i_last_pos = 0; /* used to detect read failure loops */ const uint64_t i_end = p_container->i_pos + p_container->i_size; MP4_Box_t *p_box = NULL;
View file
_service:obs_scm:vlc-beta-20260423.fd0fbaeb7.obscpio/modules/demux/mpc.c -> _service:obs_scm:vlc-beta-20260424.382296ba4.obscpio/modules/demux/mpc.c
Changed
@@ -48,13 +48,14 @@ * Module descriptor *****************************************************************************/ static int Open ( vlc_object_t * ); +static void Close ( vlc_object_t * ); vlc_module_begin () set_subcategory( SUBCAT_INPUT_DEMUX ) set_description( N_("MusePack demuxer") ) set_capability( "demux", 145 ) - set_callback( Open ) + set_callbacks( Open, Close ) add_shortcut( "mpc" ) add_file_extension("mpc") add_file_extension("mp+") @@ -191,6 +192,17 @@ } /***************************************************************************** + * Close: frees unused data + *****************************************************************************/ +static void Close( vlc_object_t * p_this ) +{ + demux_t *p_demux = (demux_t*)p_this; + demux_sys_t *p_sys = p_demux->p_sys; + + mpc_demux_exit( p_sys->decoder ); +} + +/***************************************************************************** * Demux: ***************************************************************************** * Returns -1 in case of error, 0 in case of EOF, 1 otherwise @@ -330,4 +342,3 @@ vlc_stream_Control( stream, STREAM_CAN_SEEK, &b_canseek ); return b_canseek; } -
View file
_service:obs_scm:vlc-beta-20260423.fd0fbaeb7.obscpio/modules/demux/ogg.c -> _service:obs_scm:vlc-beta-20260424.382296ba4.obscpio/modules/demux/ogg.c
Changed
@@ -146,6 +146,7 @@ static void Ogg_CreateES( demux_t *p_demux, bool ); static int Ogg_BeginningOfStream( demux_t *p_demux ); static int Ogg_FindLogicalStreams( demux_t *p_demux ); +static int Ogg_ConfigureStream( demux_t *p_demux, ogg_packet oggpacket, logical_stream_t * ); static void Ogg_EndOfStream( demux_t *p_demux ); /* */ @@ -1394,23 +1395,21 @@ } /* Backup the ogg packet (likely an header packet) */ - if( !b_xiph && (p_stream->i_headers + p_oggpacket->bytes) ) + if( !b_xiph && p_oggpacket->bytes && + p_oggpacket->bytes < SIZE_MAX - p_stream->i_headers ) { - uint8_t *p_realloc = realloc( p_stream->p_headers, p_stream->i_headers + p_oggpacket->bytes ); - if( p_realloc ) + p_stream->p_headers = realloc_or_free( p_stream->p_headers, + p_stream->i_headers + p_oggpacket->bytes ); + if( p_stream->p_headers ) { - memcpy( &p_reallocp_stream->i_headers, p_oggpacket->packet, p_oggpacket->bytes ); + memcpy( &p_stream->p_headersp_stream->i_headers, p_oggpacket->packet, p_oggpacket->bytes ); p_stream->i_headers += p_oggpacket->bytes; - p_stream->p_headers = p_realloc; } else - { - free( p_stream->p_headers ); p_stream->i_headers = 0; - p_stream->p_headers = NULL; - } } - else if( xiph_AppendHeaders( &p_stream->i_headers, &p_stream->p_headers, + else if( b_xiph && + xiph_AppendHeaders( &p_stream->i_headers, &p_stream->p_headers, p_oggpacket->bytes, p_oggpacket->packet ) ) { free(p_stream->p_headers); @@ -1424,11 +1423,13 @@ /* Last header received, commit changes */ free( p_stream->fmt.p_extra ); - p_stream->fmt.i_extra = p_stream->i_headers; p_stream->fmt.p_extra = malloc( p_stream->i_headers ); if( p_stream->fmt.p_extra ) + { memcpy( p_stream->fmt.p_extra, p_stream->p_headers, p_stream->i_headers ); + p_stream->fmt.i_extra = p_stream->i_headers; + } else p_stream->fmt.i_extra = 0; @@ -1606,58 +1607,102 @@ * * On success this function returns VLC_SUCCESS. ****************************************************************************/ -static int Ogg_FindLogicalStreams( demux_t *p_demux ) +static logical_stream_t *Ogg_FindLogicalStream( demux_t *p_demux, ogg_page *current_page ) { - demux_sys_t *p_ogg = p_demux->p_sys; - ogg_packet oggpacket; + logical_stream_t *p_stream = malloc( sizeof(logical_stream_t) ); + if( unlikely( !p_stream ) ) + return NULL; - p_ogg->i_total_bytes = stream_Size ( p_demux->s ); - msg_Dbg( p_demux, "File length is %"PRId64" bytes", p_ogg->i_total_bytes ); + Ogg_LogicalStreamInit( p_stream ); + /* Setup the logical stream */ + p_stream->i_serial_no = ogg_page_serialno( current_page ); + ogg_stream_init( &p_stream->os, p_stream->i_serial_no ); - while( Ogg_ReadPage( p_demux, &p_ogg->current_page ) == VLC_SUCCESS ) + if( ogg_page_granulepos( current_page ) == 0 && !p_stream->b_oggds ) + p_stream->page_type = OGGPAGE_HEADER; + else + p_stream->page_type = OGGPAGE_OTHER; + + /* Extract the initial header from the first page and verify + * the codec type of this Ogg bitstream */ + if( ogg_stream_pagein( &p_stream->os, current_page ) < 0 ) + { + /* error. stream version mismatch perhaps */ + msg_Err( p_demux, "error reading first page of " + "Ogg bitstream data" ); + goto failed; + } + + ogg_packet oggpacket; + if ( ogg_stream_packetpeek( &p_stream->os, &oggpacket ) != 1 ) { + msg_Err( p_demux, "error in ogg_stream_packetpeek" ); + goto failed; + } - if( ogg_page_bos( &p_ogg->current_page ) ) - { + if ( Ogg_ConfigureStream( p_demux, oggpacket, p_stream ) != VLC_SUCCESS ) + goto failed; - /* All is wonderful in our fine fine little world. - * We found the beginning of our first logical stream. */ - while( ogg_page_bos( &p_ogg->current_page ) ) - { - logical_stream_t *p_stream = malloc( sizeof(logical_stream_t) ); - if( unlikely( !p_stream ) ) - return VLC_ENOMEM; + /* we'll need to get all headers */ + p_stream->b_initializing &= p_stream->b_force_backup; - Ogg_LogicalStreamInit( p_stream ); + return p_stream; - /* Setup the logical stream */ - p_stream->i_serial_no = ogg_page_serialno( &p_ogg->current_page ); - ogg_stream_init( &p_stream->os, p_stream->i_serial_no ); +failed: + Ogg_LogicalStreamDelete( p_demux, p_stream ); + return NULL; +} - if( ogg_page_granulepos( &p_ogg->current_page ) == 0 && !p_stream->b_oggds ) - p_stream->page_type = OGGPAGE_HEADER; - else - p_stream->page_type = OGGPAGE_OTHER; +static int Ogg_FindLogicalStreams( demux_t *p_demux ) +{ + demux_sys_t *p_ogg = p_demux->p_sys; - TAB_APPEND( p_ogg->i_streams, p_ogg->pp_stream, p_stream ); + p_ogg->i_total_bytes = stream_Size ( p_demux->s ); + msg_Dbg( p_demux, "File length is %"PRId64" bytes", p_ogg->i_total_bytes ); - /* Extract the initial header from the first page and verify - * the codec type of this Ogg bitstream */ - if( ogg_stream_pagein( &p_stream->os, &p_ogg->current_page ) < 0 ) + while( Ogg_ReadPage( p_demux, &p_ogg->current_page ) == VLC_SUCCESS ) + { + /* All is wonderful in our fine fine little world. + * We found the beginning of our first logical stream. */ + if( !ogg_page_bos( &p_ogg->current_page ) ) + { + /* This is the first data page, which means we are now finished + * with the initial pages. We just need to store it in the relevant + * bitstream. */ + for( int i_stream = 0; i_stream < p_ogg->i_streams; i_stream++ ) + { + if( ogg_stream_pagein( &p_ogg->pp_streami_stream->os, + &p_ogg->current_page ) == 0 ) { - /* error. stream version mismatch perhaps */ - msg_Err( p_demux, "error reading first page of " - "Ogg bitstream data" ); - return VLC_EGENERIC; + p_ogg->b_page_waiting = true; + break; } + } + break; + } - if ( ogg_stream_packetpeek( &p_stream->os, &oggpacket ) != 1 ) - { - msg_Err( p_demux, "error in ogg_stream_packetpeek" ); - return VLC_EGENERIC; - } + /* Try to configure the new stream */ + logical_stream_t *p_stream = Ogg_FindLogicalStream( p_demux, &p_ogg->current_page ); + if( unlikely( !p_stream ) ) + continue; + TAB_APPEND( p_ogg->i_streams, p_ogg->pp_stream, p_stream ); + /* we'll need to get all headers */ + if ( p_stream ) + p_stream->b_initializing &= p_stream->b_force_backup; + } + + return p_ogg->i_streams ? VLC_SUCCESS : VLC_EGENERIC; +} + +static int Ogg_ConfigureStream( demux_t *p_demux, ogg_packet oggpacket, logical_stream_t *p_stream ) +{ + demux_sys_t *p_ogg = p_demux->p_sys; + + { // note: old indentation kept on purpose for rebases & blaming + { + { /* Check for Vorbis header */ if( oggpacket.bytes >= 7 && ! memcmp( oggpacket.packet, "\x01vorbis", 7 ) ) @@ -1668,10 +1713,7 @@ else { msg_Dbg( p_demux, "found invalid vorbis header" ); - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } /* Check for Speex header */ @@ -1690,10 +1732,7 @@ else { msg_Dbg( p_demux, "found invalid Speex header" ); - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } /* Check for Opus header */ @@ -1746,10 +1785,7 @@ if ( !Ogg_ReadFlacStreamInfo( p_demux, p_stream, &oggpacket ) ) { msg_Dbg( p_demux, "found invalid Flac header" ); - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } /* Check for Theora header */ @@ -1765,10 +1801,7 @@ else { msg_Dbg( p_demux, "found invalid Theora header" ); - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } /* Check for Daala header */ @@ -1784,10 +1817,7 @@ else { msg_Dbg( p_demux, "found invalid Daala header" ); - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } /* Check for Dirac header */ @@ -1802,10 +1832,7 @@ else { msg_Warn( p_demux, "found dirac header isn't decodable" ); - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } /* Check for VP8 header */ @@ -1822,10 +1849,7 @@ else { msg_Dbg( p_demux, "invalid VP8 header found"); - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } /* Check for Annodex header */ @@ -1834,9 +1858,7 @@ { Ogg_ReadAnnodexHeader( p_demux, p_stream, &oggpacket ); /* kill annodex track */ - FREENULL( p_stream ); - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } /* Check for Annodex header */ else if( oggpacket.bytes >= 7 && @@ -1854,10 +1876,7 @@ else { msg_Dbg( p_demux, "invalid kate header found"); - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } /* Check for OggDS */ @@ -1910,10 +1929,7 @@ if ( !p_stream->fmt.video.i_frame_rate || !p_stream->fmt.video.i_frame_rate_base ) { - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } /* Check for audio header (old format) */ @@ -1927,13 +1943,13 @@ i_extra_size = GetWLE((oggpacket.packet+140)); if( i_extra_size > 0 && i_extra_size < oggpacket.bytes - 142 ) { - p_stream->fmt.i_extra = i_extra_size; p_stream->fmt.p_extra = malloc( i_extra_size ); if( p_stream->fmt.p_extra ) + { memcpy( p_stream->fmt.p_extra, oggpacket.packet + 142, i_extra_size ); - else - p_stream->fmt.i_extra = 0; + p_stream->fmt.i_extra = i_extra_size; + } } i_format_tag = GetWLE((oggpacket.packet+124)); @@ -1974,19 +1990,14 @@ if ( p_stream->fmt.audio.i_rate == 0 ) { msg_Dbg( p_demux, "invalid oggds audio header" ); - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } else { msg_Dbg( p_demux, "stream %d has an old header " "but is of an unknown type", p_ogg->i_streams-1 ); - FREENULL( p_stream ); - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } /* Check for OggDS */ @@ -2074,13 +2085,12 @@ if( i_extra_size > 0 && i_extra_size < oggpacket.bytes - 1 - 56 ) { - p_stream->fmt.i_extra = i_extra_size; - p_stream->fmt.p_extra = malloc( p_stream->fmt.i_extra ); + p_stream->fmt.p_extra = malloc( i_extra_size ); if( p_stream->fmt.p_extra ) - memcpy( p_stream->fmt.p_extra, oggpacket.packet + 57, - p_stream->fmt.i_extra ); - else - p_stream->fmt.i_extra = 0; + { + memcpy( p_stream->fmt.p_extra, oggpacket.packet + 57, i_extra_size ); + p_stream->fmt.i_extra = i_extra_size; + } } memcpy( p_buffer, st->subtype, 4 ); @@ -2122,10 +2132,7 @@ if ( p_stream->fmt.audio.i_rate == 0 ) { msg_Dbg( p_demux, "invalid oggds audio header" ); - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } /* Check for text (subtitles) header */ @@ -2142,9 +2149,7 @@ { msg_Dbg( p_demux, "stream %d has a header marker " "but is of an unknown type", p_ogg->i_streams-1 ); - FREENULL( p_stream ); - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } else if( oggpacket.bytes >= 8 && @@ -2168,40 +2173,14 @@ else { msg_Err( p_demux, "found invalid OggSpots header" ); - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); + return VLC_EGENERIC; } } else { - Ogg_LogicalStreamDelete( p_demux, p_stream ); - p_stream = NULL; - TAB_ERASE( p_ogg->i_streams, p_ogg->pp_stream, - p_ogg->i_streams - 1 ); msg_Dbg( p_demux, "stream %d is of unknown type", p_ogg->i_streams ); - } - - /* we'll need to get all headers */ - if ( p_stream ) - p_stream->b_initializing &= p_stream->b_force_backup; - - if( Ogg_ReadPage( p_demux, &p_ogg->current_page ) != VLC_SUCCESS ) return VLC_EGENERIC; - } - - /* This is the first data page, which means we are now finished - * with the initial pages. We just need to store it in the relevant - * bitstream. */ - for( int i_stream = 0; i_stream < p_ogg->i_streams; i_stream++ ) - { - if( ogg_stream_pagein( &p_ogg->pp_streami_stream->os, - &p_ogg->current_page ) == 0 ) - { - p_ogg->b_page_waiting = true; - break; } } @@ -3103,71 +3082,75 @@ } } -static void Ogg_ApplyContentType( logical_stream_t *p_stream, const char* psz_value, +#define CMPVALUE(str) \ + (bytes >= (sizeof(str)-1) && !strncmp((const char *)p_value, str, sizeof(str)-1)) + +static void Ogg_ApplyContentType( logical_stream_t *p_stream, + const uint8_t *p_value, size_t bytes, bool *b_force_backup ) { - if( p_stream->fmt.i_cat != UNKNOWN_ES ) + if( p_stream->fmt.i_cat != UNKNOWN_ES || bytes == 0 ) return; - if( !strncmp(psz_value, "audio/x-wav", 11) ) + if( CMPVALUE("audio/x-wav") ) { /* n.b. WAVs are unsupported right now */ es_format_Change( &p_stream->fmt, UNKNOWN_ES, 0 ); free( p_stream->fmt.psz_description ); p_stream->fmt.psz_description = strdup("WAV Audio (Unsupported)"); } - else if( !strncmp(psz_value, "audio/x-vorbis", 14) || - !strncmp(psz_value, "audio/vorbis", 12) ) + else if( CMPVALUE("audio/x-vorbis") || + CMPVALUE("audio/vorbis") ) { es_format_Change( &p_stream->fmt, AUDIO_ES, VLC_CODEC_VORBIS ); *b_force_backup = true; } - else if( !strncmp(psz_value, "audio/x-speex", 13) || - !strncmp(psz_value, "audio/speex", 11) ) + else if( CMPVALUE("audio/x-speex") || + CMPVALUE("audio/speex") ) { es_format_Change( &p_stream->fmt, AUDIO_ES, VLC_CODEC_SPEEX ); *b_force_backup = true; } - else if( !strncmp(psz_value, "audio/flac", 10) ) + else if( CMPVALUE("audio/flac") ) { es_format_Change( &p_stream->fmt, AUDIO_ES, VLC_CODEC_FLAC ); *b_force_backup = true; } - else if( !strncmp(psz_value, "video/x-theora", 14) || - !strncmp(psz_value, "video/theora", 12) ) + else if( CMPVALUE("video/x-theora") || + CMPVALUE("video/theora") ) { es_format_Change( &p_stream->fmt, VIDEO_ES, VLC_CODEC_THEORA ); *b_force_backup = true; } - else if( !strncmp(psz_value, "video/x-daala", 13) || - !strncmp(psz_value, "video/daala", 11) ) + else if( CMPVALUE("video/x-daala") || + CMPVALUE("video/daala") ) { es_format_Change( &p_stream->fmt, VIDEO_ES, VLC_CODEC_DAALA ); *b_force_backup = true; } - else if( !strncmp(psz_value, "video/x-xvid", 12) ) + else if( CMPVALUE("video/x-xvid") ) { es_format_Change( &p_stream->fmt, VIDEO_ES, VLC_FOURCC( 'x','v','i','d' ) ); *b_force_backup = true; } - else if( !strncmp(psz_value, "video/mpeg", 10) ) + else if( CMPVALUE("video/mpeg") ) { /* n.b. MPEG streams are unsupported right now */ es_format_Change( &p_stream->fmt, VIDEO_ES, VLC_CODEC_MPGV ); } - else if( !strncmp(psz_value, "application/kate", 16) ) + else if( CMPVALUE("application/kate") ) { /* ??? */ es_format_Change( &p_stream->fmt, UNKNOWN_ES, 0 ); p_stream->fmt.psz_description = strdup("OGG Kate Overlay (Unsupported)"); } - else if( !strncmp(psz_value, "video/x-vp8", 11) ) + else if( CMPVALUE("video/x-vp8") ) { es_format_Change( &p_stream->fmt, VIDEO_ES, VLC_CODEC_VP8 ); } @@ -3206,7 +3189,6 @@ { uint64_t granule_rate_numerator; uint64_t granule_rate_denominator; - char content_type_string1024; /* Read in Annodex header fields */ @@ -3217,27 +3199,25 @@ /* we are guaranteed that the first header field will be * the content-type (by the Annodex standard) */ - content_type_string0 = '\0'; + long value_size = 0; if( !strncasecmp( (char*)(&p_oggpacket->packet28), "Content-Type: ", 14 ) ) { uint8_t *p = memchr( &p_oggpacket->packet42, '\r', p_oggpacket->bytes - 1 ); - if( p && p0 == '\r' && p1 == '\n' ) - sscanf( (char*)(&p_oggpacket->packet42), "%1023s\r\n", - content_type_string ); + value_size = p ? p - &p_oggpacket->packet42 : p_oggpacket->bytes - 42; } + char debug_string32 = {0}; + strncpy(debug_string, &p_oggpacket->packet42, __MIN(value_size, 31)); msg_Dbg( p_demux, "AnxData packet info: %"PRId64" / %"PRId64", %d, ``%s''", granule_rate_numerator, granule_rate_denominator, - p_stream->i_secondary_header_packets, content_type_string ); + p_stream->i_secondary_header_packets, debug_string ); if( granule_rate_numerator && granule_rate_denominator ) date_Init( &p_stream->dts, granule_rate_numerator, granule_rate_denominator ); - /* What type of file do we have? - * strcmp is safe to use here because we've extracted - * content_type_string from the stream manually */ - Ogg_ApplyContentType( p_stream, content_type_string, + /* What type of file do we have? */ + Ogg_ApplyContentType( p_stream, &p_oggpacket->packet42, value_size, &p_stream->b_force_backup ); } } @@ -3407,7 +3387,9 @@ else if ( ! strncmp("Content-Type: ", psz_message, 14 ) ) { bool b_foo; - Ogg_ApplyContentType( p_stream, psz_message + 14, &b_foo ); + psz_message += 14; + Ogg_ApplyContentType( p_stream, (const uint8_t *)psz_message, + strlen(psz_message), &b_foo ); } } }
View file
_service:obs_scm:vlc-beta-20260423.fd0fbaeb7.obscpio/modules/gui/qt/meson.build -> _service:obs_scm:vlc-beta-20260424.382296ba4.obscpio/modules/gui/qt/meson.build
Changed
@@ -23,7 +23,7 @@ # Qt module doesn't provide the framework path to moc executable, so we # need to help moc find them. It's needed for QtQml/ module registration. -if host_machine.system() == 'darwin' +if host_machine.system() == 'darwin' and qt6_dep.found() qt_libdir = qt6_dep.get_variable(pkgconfig: 'libdir', configtool: '-query QT_INSTALL_LIBS') qt_extra_flags += '-F' + qt_libdir endif
View file
_service:obs_scm:vlc-beta.obsinfo
Changed
@@ -1,4 +1,4 @@ name: vlc-beta -version: 20260423.fd0fbaeb7 -mtime: 1776967431 -commit: fd0fbaeb77101577d3bc383f7f0282fbb347db31 +version: 20260424.382296ba4 +mtime: 1777035917 +commit: 382296ba4831110a64aa3cecee3921c08d2c0faf
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.