diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-03-26 14:47:29 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-03-29 11:19:03 +0300 |
commit | ae9297097696f3d06417a6e8a5368d5f38a6edb4 (patch) | |
tree | 731784efc2e0054d885c4c1f54efe81b930a74f4 /libavcodec/eac3dec.c | |
parent | e5819fa62930966e6fb905cef21c985b91631d87 (diff) |
avcodec/eac3: add support for dependent stream
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/eac3dec.c')
-rw-r--r-- | libavcodec/eac3dec.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c index 6f6309f179..fe97d29032 100644 --- a/libavcodec/eac3dec.c +++ b/libavcodec/eac3dec.c @@ -303,13 +303,7 @@ static int ff_eac3_parse_header(AC3DecodeContext *s) /* An E-AC-3 stream can have multiple independent streams which the application can select from. each independent stream can also contain dependent streams which are used to add or replace channels. */ - if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) { - if (!s->eac3_frame_dependent_found) { - s->eac3_frame_dependent_found = 1; - avpriv_request_sample(s->avctx, "Dependent substream decoding"); - } - return AAC_AC3_PARSE_ERROR_FRAME_TYPE; - } else if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) { + if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) { av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n"); return AAC_AC3_PARSE_ERROR_FRAME_TYPE; } @@ -355,7 +349,8 @@ static int ff_eac3_parse_header(AC3DecodeContext *s) /* dependent stream channel map */ if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) { if (get_bits1(gbc)) { - skip_bits(gbc, 16); // skip custom channel map + s->channel_map = get_bits(gbc, 16); + av_log(s->avctx, AV_LOG_DEBUG, "channel_map: %0X\n", s->channel_map); } } |