[vlc-commits] gst: remove dead code
vlc | branch: master | Rémi Denis-Courmont | Fri Dec 4 17:42:59 2020 +0200| [20dbaa1c801fac138fd4bc6c37f6c20c745af85e] | committer: Rémi Denis-Courmont gst: remove dead code gst_atomic_queue_new() cannot return NULL. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=20dbaa1c801fac138fd4bc6c37f6c20c745af85e --- modules/codec/gstreamer/gstdecode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/codec/gstreamer/gstdecode.c b/modules/codec/gstreamer/gstdecode.c index 7cb798c6c6..f4302c9e2a 100644 --- a/modules/codec/gstreamer/gstdecode.c +++ b/modules/codec/gstreamer/gstdecode.c @@ -530,8 +530,6 @@ static int OpenDecoder( vlc_object_t *p_this ) /* Queue: GStreamer thread will dump buffers into this queue, * DecodeBlock() will pop out the buffers from the queue */ p_sys->p_que = gst_atomic_queue_new( 0 ); -VLC_GST_CHECK( p_sys->p_que, NULL, "failed to create queue", -VLC_ENOMEM ); p_sys->p_decode_src = gst_element_factory_make( "appsrc", NULL ); VLC_GST_CHECK( p_sys->p_decode_src, NULL, "appsrc not found", ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] mux/ts: add missing error check
vlc | branch: master | Rémi Denis-Courmont | Mon Nov 30 23:52:13 2020 +0200| [b66b683f07794af1cb95ea1fa68d353ee857f1b4] | committer: Rémi Denis-Courmont mux/ts: add missing error check > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b66b683f07794af1cb95ea1fa68d353ee857f1b4 --- modules/mux/mpeg/ts.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c index 569735541b..c5df6a1d3b 100644 --- a/modules/mux/mpeg/ts.c +++ b/modules/mux/mpeg/ts.c @@ -493,6 +493,9 @@ static csa_t *csaSetup( vlc_object_t *p_this ) csa_t *csa = csa_New(); +if( unlikely(csa == NULL) ) +return NULL; + if( csa_SetCW( p_this, csa, csack, true ) ) { free(csack); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] gst: remove bogus error message
vlc | branch: master | Rémi Denis-Courmont | Fri Dec 4 17:40:10 2020 +0200| [e7afa8c45d33b93b42b6928675e120c3a62039a7] | committer: Rémi Denis-Courmont gst: remove bogus error message A NULL list means there are no matching items. It is not an error per se. In practice, it will lead to an error later on, which will be handled properly by existing code. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e7afa8c45d33b93b42b6928675e120c3a62039a7 --- modules/codec/gstreamer/gstdecode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/codec/gstreamer/gstdecode.c b/modules/codec/gstreamer/gstdecode.c index b57464d4a5..7cb798c6c6 100644 --- a/modules/codec/gstreamer/gstdecode.c +++ b/modules/codec/gstreamer/gstdecode.c @@ -496,7 +496,6 @@ static int OpenDecoder( vlc_object_t *p_this ) /* Get the list of all the available gstreamer decoders */ p_list = gst_element_factory_list_get_elements( GST_ELEMENT_FACTORY_TYPE_DECODER, GST_RANK_MARGINAL ); -VLC_GST_CHECK( p_list, NULL, "no decoder list found", VLC_ENOMOD ); if( !dbin ) { GList *p_l; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] csa: do not handle impossibly NULL object
vlc | branch: master | Rémi Denis-Courmont | Mon Nov 30 23:58:49 2020 +0200| [7a388292db3dbed309630f1125bfe59386044062] | committer: Rémi Denis-Courmont csa: do not handle impossibly NULL object > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a388292db3dbed309630f1125bfe59386044062 --- modules/mux/mpeg/csa.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/mux/mpeg/csa.c b/modules/mux/mpeg/csa.c index e6363cd965..ba16865f48 100644 --- a/modules/mux/mpeg/csa.c +++ b/modules/mux/mpeg/csa.c @@ -78,11 +78,8 @@ void csa_Delete( csa_t *c ) */ int csa_SetCW( vlc_object_t *p_caller, csa_t *c, char *psz_ck, bool set_odd ) { -if ( !c ) -{ -msg_Dbg( p_caller, "no CSA found" ); -return VLC_ENOOBJ; -} +assert(c != NULL); + /* skip 0x */ if( psz_ck[0] == '0' && ( psz_ck[1] == 'x' || psz_ck[1] == 'X' ) ) { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] gst: do not handle impossible error
vlc | branch: master | Rémi Denis-Courmont | Fri Dec 4 17:38:42 2020 +0200| [88f3b319d3b8e1ae86e4fc889d8f9d3899e18e27] | committer: Rémi Denis-Courmont gst: do not handle impossible error Sorting a glib list cannot fail. A NULL result means the list was empty, not that an error occurred. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=88f3b319d3b8e1ae86e4fc889d8f9d3899e18e27 --- modules/codec/gstreamer/gstdecode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/codec/gstreamer/gstdecode.c b/modules/codec/gstreamer/gstdecode.c index 020bc9ded6..b57464d4a5 100644 --- a/modules/codec/gstreamer/gstdecode.c +++ b/modules/codec/gstreamer/gstdecode.c @@ -502,8 +502,6 @@ static int OpenDecoder( vlc_object_t *p_this ) GList *p_l; /* Sort them as per ranks */ p_list = g_list_sort( p_list, gst_plugin_feature_rank_compare_func ); -VLC_GST_CHECK( p_list, NULL, "failed to sort decoders list", -VLC_ENOMOD ); p_l = g_list_find_custom( p_list, , find_decoder_func ); VLC_GST_CHECK( p_l, NULL, "no suitable decoder found", VLC_ENOMOD ); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] omxil: remove dead code
vlc | branch: master | Rémi Denis-Courmont | Mon Nov 30 23:28:13 2020 +0200| [4efe147379d039aae65e76663e24759ad97297fd] | committer: Rémi Denis-Courmont omxil: remove dead code That error code cannot be returned here. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4efe147379d039aae65e76663e24759ad97297fd --- modules/codec/omxil/mediacodec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c index 041faa9a46..e5dae9343f 100644 --- a/modules/codec/omxil/mediacodec.c +++ b/modules/codec/omxil/mediacodec.c @@ -1647,8 +1647,6 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_in_block) case VLC_SUCCESS: msg_Warn(p_dec, "Restarted from DecodeBlock"); break; -case VLC_ENOOBJ: -break; default: msg_Err(p_dec, "StartMediaCodec failed"); AbortDecoderLocked(p_dec); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux/ts: handle allocation error
vlc | branch: master | Rémi Denis-Courmont | Mon Nov 30 23:54:51 2020 +0200| [9c31f2666d3a6d230239d92532d1890c94ec1b62] | committer: Rémi Denis-Courmont demux/ts: handle allocation error > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9c31f2666d3a6d230239d92532d1890c94ec1b62 --- modules/demux/mpeg/ts.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c index 54edd253ab..9c7c4625c6 100644 --- a/modules/demux/mpeg/ts.c +++ b/modules/demux/mpeg/ts.c @@ -454,8 +454,14 @@ static int Open( vlc_object_t *p_this ) p_sys->csa = csa_New(); -psz_csa2 = var_CreateGetStringCommand( p_demux, "ts-csa2-ck" ); -i_res = csa_SetCW( (vlc_object_t*)p_demux, p_sys->csa, psz_string, true ); +if( p_sys->csa ) +{ +psz_csa2 = var_CreateGetStringCommand( p_demux, "ts-csa2-ck" ); +i_res = csa_SetCW( (vlc_object_t*)p_demux, p_sys->csa, psz_string, true ); +} +else +i_res = VLC_ENOMEM; + if( i_res == VLC_SUCCESS && psz_csa2 && *psz_csa2 ) { if( csa_SetCW( (vlc_object_t*)p_demux, p_sys->csa, psz_csa2, false ) != VLC_SUCCESS ) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] csa: do not handle impossible NULL argument
vlc | branch: master | Rémi Denis-Courmont | Mon Nov 30 23:58:10 2020 +0200| [811b77c304046b4b39ee614f57bd75029e2e4385] | committer: Rémi Denis-Courmont csa: do not handle impossible NULL argument The CSA structure cannot be NULL in this context. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=811b77c304046b4b39ee614f57bd75029e2e4385 --- modules/mux/mpeg/csa.c | 6 +++--- modules/mux/mpeg/csa.h | 2 +- modules/mux/mpeg/ts.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/mux/mpeg/csa.c b/modules/mux/mpeg/csa.c index 19c2d6ad93..e6363cd965 100644 --- a/modules/mux/mpeg/csa.c +++ b/modules/mux/mpeg/csa.c @@ -26,6 +26,7 @@ # include "config.h" #endif +#include #include #include "csa.h" @@ -124,15 +125,14 @@ int csa_SetCW( vlc_object_t *p_caller, csa_t *c, char *psz_ck, bool set_odd ) /* * csa_UseKey: */ -int csa_UseKey( vlc_object_t *p_caller, csa_t *c, bool use_odd ) +void csa_UseKey( vlc_object_t *p_caller, csa_t *c, bool use_odd ) { -if ( !c ) return VLC_ENOOBJ; +assert(c != NULL); c->use_odd = use_odd; #ifndef TS_NO_CSA_CK_MSG msg_Dbg( p_caller, "using the %s key for scrambling", use_odd ? "odd" : "even" ); #endif -return VLC_SUCCESS; } /* diff --git a/modules/mux/mpeg/csa.h b/modules/mux/mpeg/csa.h index bbe13c5985..7badc3823c 100644 --- a/modules/mux/mpeg/csa.h +++ b/modules/mux/mpeg/csa.h @@ -35,7 +35,7 @@ csa_t *csa_New( void ); void csa_Delete( csa_t * ); intcsa_SetCW( vlc_object_t *p_caller, csa_t *c, char *psz_ck, bool odd ); -intcsa_UseKey( vlc_object_t *p_caller, csa_t *, bool use_odd ); +void csa_UseKey( vlc_object_t *p_caller, csa_t *, bool use_odd ); void csa_Decrypt( csa_t *, uint8_t *pkt, int i_pkt_size ); void csa_Encrypt( csa_t *, uint8_t *pkt, int i_pkt_size ); diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c index d52289a325..569735541b 100644 --- a/modules/mux/mpeg/ts.c +++ b/modules/mux/mpeg/ts.c @@ -828,10 +828,10 @@ static int ActiveKeyCallback( vlc_object_t *p_this, char const *psz_cmd, return VLC_EBADVAR; vlc_mutex_lock( _sys->csa_lock ); -i_res = csa_UseKey( p_this, p_sys->csa, use_odd ); +csa_UseKey( p_this, p_sys->csa, use_odd ); vlc_mutex_unlock( _sys->csa_lock ); -return i_res; +return VLC_SUCCESS; } /* ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] adaptive: SegmentList: Fix variable shadowing
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Dec 3 10:16:21 2020 -0800| [d9f10e44c4d39bfbc3a6022ea96a8b1f4aaf71ac] | committer: Hugo Beauzée-Luyssen adaptive: SegmentList: Fix variable shadowing Causing a potential use of uninitialized variable > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d9f10e44c4d39bfbc3a6022ea96a8b1f4aaf71ac --- modules/demux/adaptive/playlist/SegmentList.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/demux/adaptive/playlist/SegmentList.cpp b/modules/demux/adaptive/playlist/SegmentList.cpp index 92d12b56f7..71a60b09ed 100644 --- a/modules/demux/adaptive/playlist/SegmentList.cpp +++ b/modules/demux/adaptive/playlist/SegmentList.cpp @@ -178,8 +178,8 @@ bool SegmentList::getPlaybackTimeDurationBySegmentNumber(uint64_t number, return false; bool found = false; -stime_t stime = first->startTime.Get(); -stime_t sduration = 0; +stime = first->startTime.Get(); +sduration = 0; std::vector::const_iterator it = segments.begin(); for(it = segments.begin(); it != segments.end(); ++it) { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] filter_chain: Fix struct initialization
vlc | branch: master | Hugo Beauzée-Luyssen | Mon Nov 30 01:36:04 2020 -0800| [b8b8bd7ff1304647822d716828115d40539dc576] | committer: Hugo Beauzée-Luyssen filter_chain: Fix struct initialization > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b8b8bd7ff1304647822d716828115d40539dc576 --- src/misc/filter_chain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c index baa2f9684c..82068f3ff2 100644 --- a/src/misc/filter_chain.c +++ b/src/misc/filter_chain.c @@ -158,7 +158,7 @@ filter_chain_t *filter_chain_NewVideo( vlc_object_t *obj, bool allow_change, chain->parent_video_owner = *owner; } else -chain->parent_video_owner = (filter_owner_t){}; +chain->parent_video_owner = (filter_owner_t){0}; return chain; } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] adaptive: BufferingLogic: Fix variable shadowing
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Dec 3 10:15:58 2020 -0800| [0390f40ca7700c1b262333ef34733473608086ad] | committer: Hugo Beauzée-Luyssen adaptive: BufferingLogic: Fix variable shadowing > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0390f40ca7700c1b262333ef34733473608086ad --- modules/demux/adaptive/logic/BufferingLogic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/demux/adaptive/logic/BufferingLogic.cpp b/modules/demux/adaptive/logic/BufferingLogic.cpp index 0fd79232cc..0622d94690 100644 --- a/modules/demux/adaptive/logic/BufferingLogic.cpp +++ b/modules/demux/adaptive/logic/BufferingLogic.cpp @@ -182,7 +182,7 @@ uint64_t DefaultBufferingLogic::getLiveStartSegmentNumber(BaseRepresentation *re if(playlist->timeShiftBufferDepth.Get()) { stime_t edgetime; -bool b_ret = timeline->getScaledPlaybackTimeDurationBySegmentNumber(timeline->maxElementNumber(), +b_ret = timeline->getScaledPlaybackTimeDurationBySegmentNumber(timeline->maxElementNumber(), , ); if(unlikely(!b_ret)) return 0; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] adaptive: Use std::string::npos instead of a literal -1
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Dec 3 03:47:45 2020 -0800| [eaebf7d18c332316b89a8a1e550cae241a42b3eb] | committer: Hugo Beauzée-Luyssen adaptive: Use std::string::npos instead of a literal -1 MSVC complains about a negative number being assigned to an unsigned variable > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eaebf7d18c332316b89a8a1e550cae241a42b3eb --- modules/demux/dash/mpd/IsoffMainParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/demux/dash/mpd/IsoffMainParser.cpp b/modules/demux/dash/mpd/IsoffMainParser.cpp index 408c61b567..c3553657ea 100644 --- a/modules/demux/dash/mpd/IsoffMainParser.cpp +++ b/modules/demux/dash/mpd/IsoffMainParser.cpp @@ -580,7 +580,7 @@ Profile IsoffMainParser::getProfile() const urn = root->getAttributeValue("profile"); //The standard spells it the both ways... size_t pos; -size_t nextpos = -1; +size_t nextpos = std::string::npos; do { pos = nextpos + 1; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] vlc_plugin.h: Cast the deactivate function pointer
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Dec 3 03:46:23 2020 -0800| [9440b0af66b3bac420c1fd91c0d9bdb504db232c] | committer: Hugo Beauzée-Luyssen vlc_plugin.h: Cast the deactivate function pointer Instead of initializing a function pointer using a compound literal, which might not compile in C++ > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9440b0af66b3bac420c1fd91c0d9bdb504db232c --- include/vlc_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h index 63f0b3ac08..7a68c953e3 100644 --- a/include/vlc_plugin.h +++ b/include/vlc_plugin.h @@ -313,7 +313,7 @@ VLC_METADATA_EXPORTS #define set_callbacks( activate, deactivate ) \ set_callback(activate) \ if (vlc_module_set(VLC_MODULE_CB_CLOSE, #deactivate, \ - (void (*)(vlc_object_t *)){ deactivate })) \ + (void (*)(vlc_object_t *))( deactivate ))) \ goto error; #define cannot_unload_broken_library( ) \ ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] libmp4mux: Pass a value to the initializer-list
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Dec 3 03:50:44 2020 -0800| [6d1b2b6edb656a382ad5015f138c2c77b46a3d82] | committer: Hugo Beauzée-Luyssen libmp4mux: Pass a value to the initializer-list A value is mandated by C standard > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6d1b2b6edb656a382ad5015f138c2c77b46a3d82 --- modules/mux/mp4/libmp4mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c index be6f3e98f5..dc94af2a9a 100644 --- a/modules/mux/mp4/libmp4mux.c +++ b/modules/mux/mp4/libmp4mux.c @@ -777,7 +777,7 @@ static bo_t *GetHvcCTag(const uint8_t *p_extra, size_t i_extra, return hvcC; } -struct hevc_dcr_params params = { }; +struct hevc_dcr_params params = { 0 }; const uint8_t *p_nal; size_t i_nal; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] vlc_picture: Don't initialize a struct with a compound literal
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Dec 3 03:35:20 2020 -0800| [8a124f747aa09268abaa60065d06c751aacd0a19] | committer: Hugo Beauzée-Luyssen vlc_picture: Don't initialize a struct with a compound literal So that the code can build in C and C++ > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8a124f747aa09268abaa60065d06c751aacd0a19 --- include/vlc_picture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vlc_picture.h b/include/vlc_picture.h index acc856d8f5..5010c2f10a 100644 --- a/include/vlc_picture.h +++ b/include/vlc_picture.h @@ -296,7 +296,7 @@ static inline void vlc_picture_chain_GetAndClear(vlc_picture_chain_t *in, */ static inline vlc_picture_chain_t picture_GetAndResetChain(picture_t *pic) { -vlc_picture_chain_t chain = (vlc_picture_chain_t) { pic->p_next, pic->p_next }; +vlc_picture_chain_t chain = { pic->p_next, pic->p_next }; while ( chain.tail && chain.tail->p_next ) // find the proper tail chain.tail = chain.tail->p_next; pic->p_next = NULL; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] vlc_list: Don't initialize return value with a compound literal in C++
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Dec 3 03:27:37 2020 -0800| [7180df7a4407c30f2e102ce8e0ba63f5b098fec6] | committer: Hugo Beauzée-Luyssen vlc_list: Don't initialize return value with a compound literal in C++ This isn't standard C++ and fails to build with MSVC > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7180df7a4407c30f2e102ce8e0ba63f5b098fec6 --- include/vlc_list.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/vlc_list.h b/include/vlc_list.h index bdd70e3044..b805ab5bf1 100644 --- a/include/vlc_list.h +++ b/include/vlc_list.h @@ -213,7 +213,8 @@ struct vlc_list_it vlc_list_it_start(const struct vlc_list *head) { struct vlc_list *first = head->next; -return (struct vlc_list_it){ head, first, first->next }; +struct vlc_list_it it = { head, first, first->next }; +return it; } static inline bool vlc_list_it_continue(const struct vlc_list_it *restrict it) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] vout: display: Fix initialization
vlc | branch: master | Hugo Beauzée-Luyssen | Mon Nov 30 06:40:28 2020 -0800| [1f09d90676e63df53f14097761544bb825691d72] | committer: Hugo Beauzée-Luyssen vout: display: Fix initialization > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1f09d90676e63df53f14097761544bb825691d72 --- src/video_output/display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_output/display.c b/src/video_output/display.c index d1e06c9922..9ada4bedd4 100644 --- a/src/video_output/display.c +++ b/src/video_output/display.c @@ -712,7 +712,7 @@ vout_display_t *vout_display_New(vlc_object_t *parent, vout_display_t *vd = >display; vd->source = >source; vd->fmt = >display_fmt; -vd->info = (vout_display_info_t){ }; +vd->info = (vout_display_info_t){ 0 }; vd->cfg = >cfg; vd->ops = NULL; vd->sys = NULL; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] filter_chain: Fix invalid initialization
vlc | branch: master | Hugo Beauzée-Luyssen | Fri Nov 27 08:06:51 2020 -0800| [e44671d6fd633e2f95e4996de6b7d29e5716b588] | committer: Hugo Beauzée-Luyssen filter_chain: Fix invalid initialization > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e44671d6fd633e2f95e4996de6b7d29e5716b588 --- src/misc/filter_chain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c index 7f78f95334..baa2f9684c 100644 --- a/src/misc/filter_chain.c +++ b/src/misc/filter_chain.c @@ -105,7 +105,7 @@ static picture_t *filter_chain_VideoBufferNew( filter_t *filter ) // HACK as intermediate filters may not have the same video format as // the last one handled by the owner filter_owner_t saved_owner = filter->owner; -filter->owner = (filter_owner_t) {}; +filter->owner = (filter_owner_t) {0}; pic = filter_NewPicture( filter ); filter->owner = saved_owner; if( pic == NULL ) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] vlc_list: Fix dummy element initialization
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Nov 26 07:12:45 2020 -0800| [c4f0f96452453c5744b93acea4c4f939161225c3] | committer: Hugo Beauzée-Luyssen vlc_list: Fix dummy element initialization C11 (§6.7.9.1) mandates than an initializer-list contains at least an element > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c4f0f96452453c5744b93acea4c4f939161225c3 --- include/vlc_list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vlc_list.h b/include/vlc_list.h index bea20bfd9f..bdd70e3044 100644 --- a/include/vlc_list.h +++ b/include/vlc_list.h @@ -233,7 +233,7 @@ static inline void vlc_list_it_next(struct vlc_list_it *restrict it) ((sizeof (*(p)) + sizeof (max_align_t) - 1) / sizeof (max_align_t)) #define vlc_list_entry_dummy(p) \ -(0 ? (p) : ((void *)(&(max_align_t[vlc_list_entry_aligned_size(p)]){}))) +(0 ? (p) : ((void *)(&(max_align_t[vlc_list_entry_aligned_size(p)]){0}))) #define vlc_list_offset_p(p, member) \ ((p) = vlc_list_entry_dummy(p), (char *)(&(p)->member) - (char *)(p)) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] clock_internal.h: Protect against double inclusion
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Nov 26 06:03:48 2020 -0800| [ea6bd41a705b09ed772f6e22fa0630463e5fa7e2] | committer: Hugo Beauzée-Luyssen clock_internal.h: Protect against double inclusion > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ea6bd41a705b09ed772f6e22fa0630463e5fa7e2 --- src/clock/clock_internal.h | 4 1 file changed, 4 insertions(+) diff --git a/src/clock/clock_internal.h b/src/clock/clock_internal.h index 15aca0bbd0..0e4c63bd82 100644 --- a/src/clock/clock_internal.h +++ b/src/clock/clock_internal.h @@ -21,6 +21,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. */ +#ifndef CLOCK_INTERNAL_H +# define CLOCK_INTERNAL_H + #include /* @@ -60,3 +63,4 @@ static inline clock_point_t clock_point_Create(vlc_tick_t system, vlc_tick_t str return (clock_point_t) { .system = system, .stream = stream }; } +#endif \ No newline at end of file ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] config: chain: Remove carriage returns
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Dec 3 15:28:40 2020 +0100| [1b2860d72a4e3c80cf5037f4984777fe7b2e8751] | committer: Hugo Beauzée-Luyssen config: chain: Remove carriage returns > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1b2860d72a4e3c80cf5037f4984777fe7b2e8751 --- src/config/chain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/chain.c b/src/config/chain.c index feadacb730..514a571ab7 100644 --- a/src/config/chain.c +++ b/src/config/chain.c @@ -258,8 +258,8 @@ void config_ChainDestroy( config_chain_t *p_cfg ) p_next = p_cfg->p_next; -free( p_cfg->psz_name ); -free( p_cfg->psz_value ); +free( p_cfg->psz_name ); +free( p_cfg->psz_value ); free( p_cfg ); p_cfg = p_next; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] queue: Remove invalid return
vlc | branch: master | Hugo Beauzée-Luyssen | Mon Nov 30 06:21:10 2020 -0800| [a465050662f8a4d991bc75e27ea036c3cfab5b19] | committer: Hugo Beauzée-Luyssen queue: Remove invalid return > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a465050662f8a4d991bc75e27ea036c3cfab5b19 --- src/misc/queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/queue.c b/src/misc/queue.c index 2ea374a5c1..d456069b64 100644 --- a/src/misc/queue.c +++ b/src/misc/queue.c @@ -59,7 +59,7 @@ static struct vlc_queue_entry **next_p(const struct vlc_queue_entry *e, static void next_set(struct vlc_queue_entry *e, struct vlc_queue_entry *next, ptrdiff_t offset) { -return entry_set(next_p(e, offset), next); +entry_set(next_p(e, offset), next); } static struct vlc_queue_entry *next_get(const struct vlc_queue_entry *e, ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] aout: output: Remove unneeded memory fence
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Nov 26 08:37:43 2020 -0800| [872331f0e5bdaa57aef15d85c41bcdf0544c19ae] | committer: Hugo Beauzée-Luyssen aout: output: Remove unneeded memory fence Since a23c75a1f48404e4891526c7ee4ec34c199bf6f7 we use vlc_atomic_rc_t which uses memory_order_acq_rel, while the previous code was using memory_order_release > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=872331f0e5bdaa57aef15d85c41bcdf0544c19ae --- src/audio_output/output.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/audio_output/output.c b/src/audio_output/output.c index 00005f..b0ddfc64b5 100644 --- a/src/audio_output/output.c +++ b/src/audio_output/output.c @@ -386,8 +386,6 @@ void aout_Release(audio_output_t *aout) if (!vlc_atomic_rc_dec(>rc)) return; -atomic_thread_fence(memory_order_acquire); - aout_dev_t *dev; vlc_list_foreach(dev, >dev.list, node) { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] compat: tfind: Don't use K prototypes
vlc | branch: master | Hugo Beauzée-Luyssen | Tue Dec 1 08:31:43 2020 -0800| [86cb8efc29523c194c627a5fe68f1f005b619deb] | committer: Hugo Beauzée-Luyssen compat: tfind: Don't use K prototypes Some compilers are now refusing that syntax > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=86cb8efc29523c194c627a5fe68f1f005b619deb --- compat/tfind.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/compat/tfind.c b/compat/tfind.c index 743fa67513..03382f2aea 100644 --- a/compat/tfind.c +++ b/compat/tfind.c @@ -32,10 +32,7 @@ typedef struct node { /* delete node with given key */ void * -tdelete(vkey, vrootp, compar) - const void *vkey; /* key to be deleted */ - void **vrootp; /* address of the root of tree */ - int (*compar) (const void *, const void *); +tdelete(const void* vkey, void** vrootp, int (*compar)(const void*, const void*)) { node_t **rootp = (node_t **)vrootp; node_t *p, *q, *r; @@ -104,9 +101,7 @@ tdestroy_recurse(node_t* root, void (*free_action)(void *)) } void -tdestroy(vrootp, freefct) - void *vrootp; - void (*freefct)(void *); +tdestroy(void *vrootp, void (*freefct)(void*)) { node_t *root = (node_t *) vrootp; @@ -130,10 +125,7 @@ tdestroy(vrootp, freefct) /* find a node, or return 0 */ void * -tfind(vkey, vrootp, compar) - const void *vkey; /* key to be found */ - void * const *vrootp; /* address of the tree root */ - int (*compar) (const void *, const void *); +tfind(const void* vkey, void* const *vrootp, int (*compar) (const void *, const void *)) { node_t * const *rootp = (node_t * const*)vrootp; @@ -171,10 +163,7 @@ tfind(vkey, vrootp, compar) /* find or insert datum into search tree */ void * -tsearch(vkey, vrootp, compar) - const void *vkey; /* key to be located */ - void **vrootp; /* address of tree root */ - int (*compar) (const void *, const void *); +tsearch(const void* vkey, void** vrootp, int (*compar)(const void*, const void*)) { node_t *q; node_t **rootp = (node_t **)vrootp; @@ -221,10 +210,7 @@ tsearch(vkey, vrootp, compar) /* Walk the nodes of a tree */ static void -twalk_recurse(root, action, level) - const node_t *root; /* Root of the tree to be walked */ - void (*action) (const void *, VISIT, int); - int level; +twalk_recurse(const node_t* root, void (*action)(const void*, VISIT, int), int level) { assert(root != NULL); assert(action != NULL); @@ -244,9 +230,7 @@ twalk_recurse(root, action, level) /* Walk the nodes of a tree */ void -twalk(vroot, action) - const void *vroot; /* Root of the tree to be walked */ - void (*action) (const void *, VISIT, int); +twalk(const void* vroot, void (*action)(const void*, VISIT, int)) { if (vroot != NULL && action != NULL) twalk_recurse(vroot, action, 0); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] input: Fix potential use of an uninitialized pointer
vlc | branch: master | Hugo Beauzée-Luyssen | Fri Nov 27 08:11:36 2020 -0800| [a7c322902c667a483cfefc556fcc30f3d4d0d8c6] | committer: Hugo Beauzée-Luyssen input: Fix potential use of an uninitialized pointer > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a7c322902c667a483cfefc556fcc30f3d4d0d8c6 --- src/input/input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input/input.c b/src/input/input.c index 5294603e0d..dafead8408 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -1180,6 +1180,8 @@ static void InitPrograms( input_thread_t * p_input ) int *tab; size_t count; +TAB_INIT(count, tab); + /* Compute correct pts_delay */ UpdatePtsDelay( p_input ); @@ -1193,7 +1195,6 @@ static void InitPrograms( input_thread_t * p_input ) { char *buf; -TAB_INIT(count, tab); for( const char *prgm = strtok_r( prgms, ",", ); prgm != NULL; prgm = strtok_r( NULL, ",", ) ) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits