X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Flibdavs2.c;h=aa1478290abfdc31e8afe075f2fdb9b0b013934f;hb=fef2162b6ea752c76a1220f59ad962b65a400fc3;hp=70aae3e5eb02884df732c58e34bdf0a5cd638ca9;hpb=26148e923613e718787c6fc4bf3f64e8909f597c;p=ffmpeg diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c index 70aae3e5eb0..aa1478290ab 100644 --- a/libavcodec/libdavs2.c +++ b/libavcodec/libdavs2.c @@ -22,13 +22,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavutil/avassert.h" -#include "libavutil/common.h" -#include "libavutil/avutil.h" #include "avcodec.h" -#include "libavutil/imgutils.h" -#include "internal.h" - #include "davs2.h" typedef struct DAVS2Context { @@ -56,7 +50,7 @@ static av_cold int davs2_init(AVCodecContext *avctx) if (!cad->decoder) { av_log(avctx, AV_LOG_ERROR, "decoder created error."); - return AVERROR(EINVAL); + return AVERROR_EXTERNAL; } av_log(avctx, AV_LOG_VERBOSE, "decoder created. %p\n", cad->decoder); @@ -90,7 +84,7 @@ static int davs2_dump_frames(AVCodecContext *avctx, davs2_picture_t *pic, if (!frame->buf[plane]){ av_log(avctx, AV_LOG_ERROR, "dump error: alloc failed.\n"); - return AVERROR(EINVAL); + return AVERROR(ENOMEM); } frame->data[plane] = frame->buf[plane]->data; @@ -148,7 +142,7 @@ static int davs2_decode_frame(AVCodecContext *avctx, void *data, if (ret == DAVS2_ERROR) { av_log(avctx, AV_LOG_ERROR, "Decoder error: can't read packet\n"); - return AVERROR(EINVAL); + return AVERROR_EXTERNAL; } ret = davs2_decoder_recv_frame(cad->decoder, &cad->headerset, &cad->out_frame);