]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/internal.h
Merge commit 'e57c4706e969afa1f2384481b955ccd9494cddb5'
[ffmpeg] / libavcodec / internal.h
index 17ca8bb8c2dd59dc1674e702f2b1a9ef730b5ae9..01620fa125e13d70da9f765eeb15df5f5d84bf17 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
      */
@@ -169,6 +172,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);