diff mbox series

[FFmpeg-devel,12/27] fftools/ffmpeg: drop unused hwaccel variables

Message ID 20220723140952.31814-12-anton@khirnov.net
State Accepted
Commit 6353b2804237b1493bc0ac69a467859b85c44b3d
Headers show
Series [FFmpeg-devel,01/27] fftools/ffmpeg: replace AVFrame.pkt_duration with duration | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov July 23, 2022, 2:09 p.m. UTC
---
 fftools/ffmpeg.c | 3 ---
 fftools/ffmpeg.h | 6 ------
 2 files changed, 9 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 30618c6a6a..f39966f096 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2275,7 +2275,6 @@  static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_
         if (err < 0)
             goto fail;
     }
-    ist->hwaccel_retrieved_pix_fmt = decoded_frame->format;
 
     best_effort_timestamp= decoded_frame->best_effort_timestamp;
     *duration_pts = decoded_frame->duration;
@@ -4428,8 +4427,6 @@  static int transcode(void)
         ist = input_streams[i];
         if (ist->decoding_needed) {
             avcodec_close(ist->dec_ctx);
-            if (ist->hwaccel_uninit)
-                ist->hwaccel_uninit(ist->dec_ctx);
         }
     }
 
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 0795a380f8..bc78570d16 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -385,12 +385,8 @@  typedef struct InputStream {
     char  *hwaccel_device;
     enum AVPixelFormat hwaccel_output_format;
 
-    /* hwaccel context */
-    void  *hwaccel_ctx;
-    void (*hwaccel_uninit)(AVCodecContext *s);
     int  (*hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame);
     enum AVPixelFormat hwaccel_pix_fmt;
-    enum AVPixelFormat hwaccel_retrieved_pix_fmt;
 
     /* stats */
     // combined size of all the packets read
@@ -493,8 +489,6 @@  typedef struct OutputStream {
     int64_t last_dropped;
     int64_t last_nb0_frames[3];
 
-    void  *hwaccel_ctx;
-
     /* video only */
     AVRational frame_rate;
     AVRational max_frame_rate;