diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-02-14 20:51:06 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2017-02-25 09:57:44 +0100 |
commit | 984736dd9e5b50987a5910e22495304e4a6d975c (patch) | |
tree | 606d2dbd201aa2c91e9528515b49c429fa9dac36 /libavcodec/aacdec.c | |
parent | 4cc0227040adb9efc63be6a5765e3214f5c6f662 (diff) |
lavc: make sure not to return EAGAIN from codecs
This error is treated specially by the API.
CC: libav-stable@libav.org
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 22ebcdc570..4ba346ac48 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -3228,7 +3228,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); @@ -3265,8 +3265,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) { |