summaryrefslogtreecommitdiff
path: root/plugins/ffmpeg
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ffmpeg')
-rw-r--r--plugins/ffmpeg/ffmpeg.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c
index cda37555..d0775c66 100644
--- a/plugins/ffmpeg/ffmpeg.c
+++ b/plugins/ffmpeg/ffmpeg.c
@@ -206,7 +206,14 @@ ffmpeg_init (DB_fileinfo_t *_info, DB_playItem_t *it) {
int64_t layout = info->ctx->channel_layout;
- _info->fmt.channelmask = layout;
+ if (layout != 0) {
+ _info->fmt.channelmask = layout;
+ }
+ else {
+ for (int i = 0; i < _info->fmt.channels; i++) {
+ _info->fmt.channelmask |= 1 << i;
+ }
+ }
// subtrack info
info->currentsample = 0;