diff options
author | waker <wakeroid@gmail.com> | 2011-02-05 13:04:09 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-02-05 13:04:09 +0100 |
commit | 55226102b75499e710ffff74444b04ca33078b91 (patch) | |
tree | 3ff7584dead61b7c01f4ce90a5fbdc84d7f176de | |
parent | 5e43f1e48df400789faac8f22fe9ecfaf77d4d41 (diff) |
ffmpeg channelmask fix
-rw-r--r-- | plugins/ffmpeg/ffmpeg.c | 9 |
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; |