]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/internal.h
avcodec/avcodec: Store whether AVCodec->close needs to be called
[ffmpeg] / libavcodec / internal.h
index b57b9968166f9032baa06ff84e9426b493a8fee5..60f65d3f2cd693fcbfe5375a3fb9f423074b3c78 100644 (file)
@@ -136,10 +136,6 @@ typedef struct AVCodecInternal {
      */
     int last_audio_frame;
 
-#if FF_API_OLD_ENCDEC
-    AVFrame *to_free;
-#endif
-
     AVBufferRef *pool;
 
     void *thread_ctx;
@@ -164,6 +160,12 @@ typedef struct AVCodecInternal {
 
     EncodeSimpleContext es;
 
+    /**
+     * If this is set, then AVCodec->close (if existing) needs to be called
+     * for the parent AVCodecContext.
+     */
+    int needs_close;
+
     /**
      * Number of audio samples to skip at the start of the next decoded frame
      */
@@ -186,18 +188,6 @@ typedef struct AVCodecInternal {
     AVFrame *buffer_frame;
     int draining_done;
 
-#if FF_API_OLD_ENCDEC
-    int compat_decode_warned;
-    /* this variable is set by the decoder internals to signal to the old
-     * API compat wrappers the amount of data consumed from the last packet */
-    size_t compat_decode_consumed;
-    /* when a partial packet has been consumed, this stores the remaining size
-     * of the packet (that should be submitted in the next decode call */
-    size_t compat_decode_partial_size;
-    AVFrame *compat_decode_frame;
-    AVPacket *compat_encode_packet;
-#endif
-
     int showed_multi_packet_warning;
 
     int skip_samples_multiplier;