diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-05-27 06:45:49 +0300 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2020-05-27 16:59:51 +0300 |
commit | 467d9e27e0cb2bf74f41dc832f2f8d191ba58ec9 (patch) | |
tree | bb5d51825fb4f8d5d25444452a27183ee69e1261 /libavcodec/h261enc.c | |
parent | 6124cbdcfaab134a066e67706c92c8f01b4e13ff (diff) |
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>
Diffstat (limited to 'libavcodec/h261enc.c')
-rw-r--r-- | libavcodec/h261enc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index 315762c10c..196c37b543 100644 --- a/libavcodec/h261enc.c +++ b/libavcodec/h261enc.c @@ -394,6 +394,7 @@ AVCodec ff_h261_encoder = { .init = ff_mpv_encode_init, .encode2 = ff_mpv_encode_picture, .close = ff_mpv_encode_end, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, .priv_class = &h261_class, |