avcodec/h264dec: Add FF_CODEC_CAP_INIT_CLEANUP
authorLimin Wang <lance.lmwang@gmail.com>
Wed, 27 May 2020 04:35:28 +0000 (12:35 +0800)
committerLimin Wang <lance.lmwang@gmail.com>
Wed, 27 May 2020 13:59:51 +0000 (21:59 +0800)
commitb01d12bcc0fcebb2b5f06296d7a5c140cb30655b
tree0937ff6aab4bb1cf9cf58a2c8c4d791c4c48a138
parent467d9e27e0cb2bf74f41dc832f2f8d191ba58ec9
avcodec/h264dec: Add FF_CODEC_CAP_INIT_CLEANUP

then ff_h264_free_tables() and h264_decode_end() can be removed
in h264_decode_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.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
libavcodec/h264dec.c