]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/internal.h
tiffdec: support LZW compression with inverted FillOrder
[ffmpeg] / libavcodec / internal.h
index 17ca8bb8c2dd59dc1674e702f2b1a9ef730b5ae9..2d3433f4346e96620f273b59be6d7eb2b0230946 100644 (file)
@@ -39,9 +39,6 @@ typedef struct InternalBuffer {
     int width;
     int height;
     enum AVPixelFormat pix_fmt;
-    uint8_t **extended_data;
-    int audio_data_size;
-    int nb_channels;
 } InternalBuffer;
 
 typedef struct AVCodecInternal {
@@ -79,6 +76,12 @@ typedef struct AVCodecInternal {
      */
     int last_audio_frame;
 
+    /**
+     * The data for the last allocated audio frame.
+     * Stored here so we can free it.
+     */
+    uint8_t *audio_data;
+
     /**
      * temporary buffer used for encoders to store their bitstream
      */
@@ -126,6 +129,10 @@ void ff_init_buffer_info(AVCodecContext *s, AVFrame *frame);
  */
 void ff_packet_free_side_data(AVPacket *pkt);
 
+extern volatile int ff_avcodec_locked;
+int ff_lock_avcodec(AVCodecContext *log_ctx);
+int ff_unlock_avcodec(void);
+
 int avpriv_lock_avformat(void);
 int avpriv_unlock_avformat(void);
 
@@ -169,6 +176,13 @@ static av_always_inline int64_t ff_samples_to_time_base(AVCodecContext *avctx,
                         avctx->time_base);
 }
 
+/**
+ * Get a buffer for a frame. This is a wrapper around
+ * AVCodecContext.get_buffer() and should be used instead calling get_buffer()
+ * directly.
+ */
+int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame);
+
 int ff_thread_can_start_frame(AVCodecContext *avctx);
 
 int ff_get_logical_cpus(AVCodecContext *avctx);