From 9ce45261399e2ee99f468c5016b378fd5360ae12 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 22 Sep 2014 22:38:06 +0200 Subject: [PATCH] audio: prefer libavcodec over libmpg123 libavcodec/libavformat now handles gapless audio better. In theory, this could be implemented with ad_mpg123 too, but since libavformat strips metadata from mp3 files and passes pure mp3 packets to the decoders only, this can't work by itself. Instead, the player must pass this metadata separately. libav* do this relatively transparently over packet "side data" (attached to AVPacket). It might also be possible to let libmpg123 handles all this by implementing it as demuxer that outputs PCM, but that would have other problems, and I think it's better to make libavformat work correctly. libmpg123 can still be used with '--ad=mpg123:mp3'. Also see issue #1101. --- audio/decode/dec_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c index 0afcd8857e..4b8ae7949c 100644 --- a/audio/decode/dec_audio.c +++ b/audio/decode/dec_audio.c @@ -48,10 +48,10 @@ extern const struct ad_functions ad_lavc; extern const struct ad_functions ad_spdif; static const struct ad_functions * const ad_drivers[] = { + &ad_lavc, #if HAVE_MPG123 &ad_mpg123, #endif - &ad_lavc, &ad_spdif, NULL };