diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-06-06 12:54:25 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-06-19 09:48:55 +0200 |
commit | 25d96ab6c03ce979a14c05ed7a737d345d8d36a1 (patch) | |
tree | 4e79db3856d7997d6d3e3b0637b6c6b72e2944ad /fftools/ffmpeg_hw.c | |
parent | 6c9cbf7507a7c083bc37ffa130b77b42307dc142 (diff) |
fftools/ffmpeg_hw: inline hwaccel_decode_init() into its caller
The function is now trivial and cannot fail, so all error handling in
its caller can be removed.
Diffstat (limited to 'fftools/ffmpeg_hw.c')
-rw-r--r-- | fftools/ffmpeg_hw.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/fftools/ffmpeg_hw.c b/fftools/ffmpeg_hw.c index 4a0b346fe1..46bc7e39c2 100644 --- a/fftools/ffmpeg_hw.c +++ b/fftools/ffmpeg_hw.c @@ -297,7 +297,7 @@ void hw_device_free_all(void) nb_hw_devices = 0; } -static int hwaccel_retrieve_data(AVCodecContext *avctx, AVFrame *input) +int hwaccel_retrieve_data(AVCodecContext *avctx, AVFrame *input) { InputStream *ist = avctx->opaque; AVFrame *output = NULL; @@ -339,15 +339,6 @@ fail: return err; } -int hwaccel_decode_init(AVCodecContext *avctx) -{ - InputStream *ist = avctx->opaque; - - ist->hwaccel_retrieve_data = &hwaccel_retrieve_data; - - return 0; -} - AVBufferRef *hw_device_for_filter(void) { // Pick the last hardware device if the user doesn't pick the device for |