




















Hello everyone,
I tried to play a CD with vlc and found it fetched incorrect CDDB information. All CDs I have were matched to wrong titles and covers.
I checked the `PKGBUILD` file and vlc's source code and found that:
in `modules/access/cdda.c`,there is:
#ifdef HAVE_GCRYPT
static char * BuildMusicbrainzDiscID( const vcddev_toc_t *p_toc,
int i_total, int i_first, int i_last )
{
...
return out;
}
#else
# define BuildMusicbrainzDiscID(a, b, c, d) (NULL)
#endifand in function `GetMusicbrainzInfo`:
/* Build DISC ID based on SHA1 */
char *psz_disc_id = BuildMusicbrainzDiscID( p_toc,
i_total, i_first, i_last );
if( psz_disc_id )
{
recording = musicbrainz_lookup_recording_by_discid( &cfg, psz_disc_id );
}
else /* Fuzzy lookup using TOC */
{
...
}It means if macro `HAVE_GCRYPT` is undefined, function `BuildMusicbrainzDiscID` will always returns NULL and it falls back to fuzzy lookup in function `GetMusicbrainzInfo`, which is easier to get a wrong result.
And in `PKGBUILD`:
build() {
local configure_options=(
....
--disable-libgcrypt
....
)DO undefined `HAVE_GCRYPT` and DO returns a wrong result for me.
I tried to build from the source code with flag `--enable-libgcrypt` in `PKGBUILD` and then it works perfectly to get the correct information.
All of my changes:
makedepends=(
libgcrypt # add depend
...
)
build() {
local configure_options=(
...
--enable-libgcrypt # replace `--disable-libgcrypt`
....
)
package_vlc() {
...
rmdir -v --ignore-fail-on-non-empty "$pkgdir/usr/lib/vlc/plugins/"{access{,_output},audio_{filter,output},codec,control,demux,gui,keystore,logger,meta_engine,misc,mux,notify,packetizer,services_discovery,spu,stream_{extractor,filter,out},text_renderer,vaapi,vdpau,video_{chroma,filter,output}}
# add flag `--ignore-fail-on-non-empty` to ignore errors in deleting empty directories
}I don't know if these changes have any side effects to my system.
But I wonder why `libgcrypt` is excluded from vlc. As a widely included depend lib, exclude it will never make the system simpler.
What should I do next?
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。