aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avcodec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-04-28 11:48:04 +0200
committerLynne <dev@lynne.ee>2023-05-29 00:41:27 +0200
commit3d2e1aa3242d6c4dc2b3a004b316921ce7e0ba79 (patch)
treeb77e0e6ddca339e1b6bfb7594c3801fd3f2bd472 /libavcodec/avcodec.c
parenta4611e3170b7f5240f719465d8033ab33a34cd70 (diff)
downloadffmpeg-3d2e1aa3242d6c4dc2b3a004b316921ce7e0ba79.tar.gz
lavc/decode: stop duplicating code from hwaccel_uninit()
Diffstat (limited to 'libavcodec/avcodec.c')
-rw-r--r--libavcodec/avcodec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index 5a96899d50..db8226f9b3 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -39,6 +39,7 @@
#include "decode.h"
#include "encode.h"
#include "frame_thread_encoder.h"
+#include "hwconfig.h"
#include "internal.h"
#include "thread.h"
@@ -459,9 +460,7 @@ av_cold int avcodec_close(AVCodecContext *avctx)
av_buffer_unref(&avci->pool);
- if (avctx->hwaccel && avctx->hwaccel->uninit)
- avctx->hwaccel->uninit(avctx);
- av_freep(&avci->hwaccel_priv_data);
+ ff_hwaccel_uninit(avctx);
av_bsf_free(&avci->bsf);