diff options
author | Tim Walker <tdskywalker@gmail.com> | 2016-04-01 04:22:47 +0300 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2016-04-02 15:05:07 +0300 |
commit | fef2147b7a689b80d716c3edb9d4a18904865275 (patch) | |
tree | a0b8fef810f3bc09ce247b756402613cb96ea7a5 /libavcodec/eac3dec.c | |
parent | 1db8eb154908cde577477b6ab17430a0cd46b7bd (diff) |
eac3dec: don't call avpriv_request_sample every frame.
These errors neither prevent nor stop successful decoding
of the E-AC-3 stream's "core", causing avpriv_request_sample
to be called for every single frame in the bitstream.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/eac3dec.c')
-rw-r--r-- | libavcodec/eac3dec.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c index b9d079ce8d..fe52d27123 100644 --- a/libavcodec/eac3dec.c +++ b/libavcodec/eac3dec.c @@ -300,7 +300,10 @@ int ff_eac3_parse_header(AC3DecodeContext *s) 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) { - avpriv_request_sample(s->avctx, "Dependent substream decoding"); + 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) { av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n"); @@ -312,7 +315,10 @@ int ff_eac3_parse_header(AC3DecodeContext *s) associated to an independent stream have matching substream id's. */ if (s->substreamid) { /* only decode substream with id=0. skip any additional substreams. */ - avpriv_request_sample(s->avctx, "Additional substreams"); + if (!s->eac3_subsbtreamid_found) { + s->eac3_subsbtreamid_found = 1; + avpriv_request_sample(s->avctx, "Additional substreams"); + } return AAC_AC3_PARSE_ERROR_FRAME_TYPE; } |