diff options
author | James Almer <jamrial@gmail.com> | 2017-10-03 20:35:17 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-10-03 20:52:44 -0300 |
commit | 5678b2a82074e4926ce0b73dc4e1190c8dfcd35d (patch) | |
tree | e333583259781d18fdb57d3d1bf754899ca69303 /libavcodec/aacdec.c | |
parent | 9266cc54aa5c882c16d994ce1b0f6043ba9c2a87 (diff) | |
parent | 984736dd9e5b50987a5910e22495304e4a6d975c (diff) | |
download | ffmpeg-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.c | 6 |
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) { |