avcodec: Add FF_CODEC_CAP_INIT_CLEANUP
authorLimin Wang <lance.lmwang@gmail.com>
Wed, 27 May 2020 03:45:49 +0000 (11:45 +0800)
committerLimin Wang <lance.lmwang@gmail.com>
Wed, 27 May 2020 13:59:51 +0000 (21:59 +0800)
commit467d9e27e0cb2bf74f41dc832f2f8d191ba58ec9
treebb5d51825fb4f8d5d25444452a27183ee69e1261
parent6124cbdcfaab134a066e67706c92c8f01b4e13ff
avcodec: Add FF_CODEC_CAP_INIT_CLEANUP

then ff_mpv_encode_end() will be unnecessary in ff_mpv_encode_init()
if it's failed.

The FF_CODEC_CAP_INIT_CLEANUP flag is need for single thread, For multithread,
it'll be cleanup still by AV_CODEC_CAP_FRAME_THREADS flag if have.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
libavcodec/flvenc.c
libavcodec/h261enc.c
libavcodec/mjpegenc.c
libavcodec/mpeg4videoenc.c
libavcodec/mpegvideo_enc.c
libavcodec/rv10enc.c
libavcodec/rv20enc.c
libavcodec/wmv2enc.c