[FFmpeg-devel] [PATCH] lavc/libdavs2: use assert instead of wrong return value

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Nov 1 18:53:19 EET 2018


2018-11-01 5:20 GMT+01:00, hwren <hwrenx at 126.com>:
> Signed-off-by: hwren <hwrenx at 126.com>
> ---
>  libavcodec/libdavs2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c
> index 4dbce73..acdfaca 100644
> --- a/libavcodec/libdavs2.c
> +++ b/libavcodec/libdavs2.c
> @@ -93,7 +93,7 @@ static int davs2_dump_frames(AVCodecContext *avctx,
> davs2_picture_t *pic,
>              break;
>          default:
>              av_log(avctx, AV_LOG_ERROR, "Decoder error: unknown frame
> type\n");
> -            return AVERROR_EXTERNAL;
> +            assert(0);

Please do not assert on return values of an external library.

Carl Eugen


More information about the ffmpeg-devel mailing list