diff options
-rw-r--r-- | src/player.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/player.c b/src/player.c index 8d325ea..78a5562 100644 --- a/src/player.c +++ b/src/player.c @@ -216,6 +216,13 @@ static bool openFilter (player_t * const player) { /* abuffer */ AVRational time_base = player->st->time_base; + + /* Workaround for a bug in libav-11, which reports an invalid channel + * layout mp3 files */ + if (cctx->channel_layout == 0) { + cctx->channel_layout = av_get_default_channel_layout (cctx->channels); + } + snprintf (strbuf, sizeof (strbuf), "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%"PRIx64, time_base.num, time_base.den, cctx->sample_rate, |