1
0

040-clear_dynlink_errors.patch 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. --- a/faad.c
  2. +++ b/faad.c
  3. @@ -594,6 +594,8 @@ static bool load_faad() {
  4. return false;
  5. }
  6. + err = dlerror(); // Reset previous dynamic linking error string (if there was)
  7. +
  8. a->NeAACDecGetCurrentConfiguration = dlsym(handle, "NeAACDecGetCurrentConfiguration");
  9. a->NeAACDecSetConfiguration = dlsym(handle, "NeAACDecSetConfiguration");
  10. a->NeAACDecOpen = dlsym(handle, "NeAACDecOpen");
  11. --- a/ffmpeg.c
  12. +++ b/ffmpeg.c
  13. @@ -620,6 +620,8 @@ static bool load_ff() {
  14. return false;
  15. }
  16. + err = dlerror(); // Reset previous dynamic linking error string (if there was)
  17. +
  18. sprintf(name, LIBAVFORMAT, LIBAVFORMAT_VERSION_MAJOR);
  19. handle_format = dlopen(name, RTLD_NOW);
  20. if (!handle_format) {
  21. --- a/flac.c
  22. +++ b/flac.c
  23. @@ -241,6 +241,8 @@ static bool load_flac() {
  24. return false;
  25. }
  26. + err = dlerror(); // Reset previous dynamic linking error string (if there was)
  27. +
  28. f->FLAC__StreamDecoderErrorStatusString = dlsym(handle, "FLAC__StreamDecoderErrorStatusString");
  29. f->FLAC__StreamDecoderStateString = dlsym(handle, "FLAC__StreamDecoderStateString");
  30. f->FLAC__stream_decoder_new = dlsym(handle, "FLAC__stream_decoder_new");
  31. --- a/ir.c
  32. +++ b/ir.c
  33. @@ -168,10 +168,10 @@ static void *ir_thread() {
  34. UNLOCK_I;
  35. wake_controller();
  36. }
  37. -
  38. +
  39. free(code);
  40. }
  41. -
  42. +
  43. return 0;
  44. }
  45. @@ -185,6 +185,8 @@ static bool load_lirc() {
  46. return false;
  47. }
  48. + err = dlerror(); // Reset previous dynamic linking error string (if there was)
  49. +
  50. i->lirc_init = dlsym(handle, "lirc_init");
  51. i->lirc_deinit = dlsym(handle, "lirc_deinit");
  52. i->lirc_readconfig = dlsym(handle, "lirc_readconfig");
  53. --- a/mad.c
  54. +++ b/mad.c
  55. @@ -365,7 +365,9 @@ static bool load_mad() {
  56. LOG_INFO("dlerror: %s", dlerror());
  57. return false;
  58. }
  59. -
  60. +
  61. + err = dlerror(); // Reset previous dynamic linking error string (if there was)
  62. +
  63. m->mad_stream_init = dlsym(handle, "mad_stream_init");
  64. m->mad_frame_init = dlsym(handle, "mad_frame_init");
  65. m->mad_synth_init = dlsym(handle, "mad_synth_init");
  66. --- a/mpg.c
  67. +++ b/mpg.c
  68. @@ -222,7 +222,9 @@ static bool load_mpg() {
  69. LOG_INFO("dlerror: %s", dlerror());
  70. return false;
  71. }
  72. -
  73. +
  74. + err = dlerror(); // Reset previous dynamic linking error string (if there was)
  75. +
  76. m->mpg123_init = dlsym(handle, "mpg123_init");
  77. m->mpg123_feature = dlsym(handle, "mpg123_feature");
  78. m->mpg123_rates = dlsym(handle, "mpg123_rates");
  79. --- a/resample.c
  80. +++ b/resample.c
  81. @@ -251,6 +251,8 @@ static bool load_soxr(void) {
  82. return false;
  83. }
  84. + err = dlerror(); // Reset previous dynamic linking error string (if there was)
  85. +
  86. r->soxr_io_spec = dlsym(handle, "soxr_io_spec");
  87. r->soxr_quality_spec = dlsym(handle, "soxr_quality_spec");
  88. r->soxr_create = dlsym(handle, "soxr_create");
  89. --- a/vorbis.c
  90. +++ b/vorbis.c
  91. @@ -287,6 +287,8 @@ static bool load_vorbis() {
  92. }
  93. }
  94. + err = dlerror(); // Reset previous dynamic linking error string (if there was)
  95. +
  96. v->ov_read = tremor ? NULL : dlsym(handle, "ov_read");
  97. v->ov_read_tremor = tremor ? dlsym(handle, "ov_read") : NULL;
  98. v->ov_info = dlsym(handle, "ov_info");