Message ID | 1536731588-9553-2-git-send-email-hwrenx@126.com |
---|---|
State | Accepted |
Commit | c0e9824c0f250aa993f1f189dbd75e2a89924325 |
Headers | show |
On Wed, Sep 12, 2018 at 2:24 PM hwren <hwrenx@126.com> wrote: > > Signed-off-by: hwren <hwrenx@126.com> > --- > libavcodec/libdavs2.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c > index ab9e511..aa14782 100644 > --- a/libavcodec/libdavs2.c > +++ b/libavcodec/libdavs2.c > @@ -50,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); > @@ -84,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; > @@ -142,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); > -- > 2.7.4 > LGTM
On 12/09/18 06:53, hwren wrote: > Signed-off-by: hwren <hwrenx@126.com> > --- > libavcodec/libdavs2.c | 6 ------ > 1 file changed, 6 deletions(-) On 12/09/18 06:53, hwren wrote: > Signed-off-by: hwren <hwrenx@126.com> > --- > libavcodec/libdavs2.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Both applied. Thanks, - Mark
diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c index ab9e511..aa14782 100644 --- a/libavcodec/libdavs2.c +++ b/libavcodec/libdavs2.c @@ -50,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); @@ -84,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; @@ -142,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);
Signed-off-by: hwren <hwrenx@126.com> --- libavcodec/libdavs2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)