summaryrefslogtreecommitdiff
path: root/libavcodec/aacdec.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-10-03 20:35:17 -0300
committerJames Almer <jamrial@gmail.com>2017-10-03 20:52:44 -0300
commit5678b2a82074e4926ce0b73dc4e1190c8dfcd35d (patch)
treee333583259781d18fdb57d3d1bf754899ca69303 /libavcodec/aacdec.c
parent9266cc54aa5c882c16d994ce1b0f6043ba9c2a87 (diff)
parent984736dd9e5b50987a5910e22495304e4a6d975c (diff)
downloadffmpeg-5678b2a82074e4926ce0b73dc4e1190c8dfcd35d.tar.gz
Merge commit '984736dd9e5b50987a5910e22495304e4a6d975c'
* commit '984736dd9e5b50987a5910e22495304e4a6d975c': lavc: make sure not to return EAGAIN from codecs Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r--libavcodec/aacdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index f3656c056a..fe50871476 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -458,7 +458,7 @@ static int read_audio_mux_element(struct LATMContext *latmctx,
} else if (!latmctx->aac_ctx.avctx->extradata) {
av_log(latmctx->aac_ctx.avctx, AV_LOG_DEBUG,
"no decoder config found\n");
- return AVERROR(EAGAIN);
+ return 1;
}
if (latmctx->audio_mux_version_A == 0) {
int mux_slot_length_bytes = read_payload_length_info(latmctx, gb);
@@ -495,8 +495,8 @@ static int latm_decode_frame(AVCodecContext *avctx, void *out,
if (muxlength > avpkt->size)
return AVERROR_INVALIDDATA;
- if ((err = read_audio_mux_element(latmctx, &gb)) < 0)
- return err;
+ if ((err = read_audio_mux_element(latmctx, &gb)))
+ return (err < 0) ? err : avpkt->size;
if (!latmctx->initialized) {
if (!avctx->extradata) {