[FFmpeg-cvslog] Add frame_size to AVCodecParameters

Hendrik Leppkes git at videolan.org
Thu Mar 31 22:22:44 CEST 2016


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Sat Mar  5 11:22:11 2016 +0100| [5b4f8af2f1ac0595062dbb040db413633e9ef2fc] | committer: Derek Buitenhuis

Add frame_size to AVCodecParameters

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5b4f8af2f1ac0595062dbb040db413633e9ef2fc
---

 libavcodec/avcodec.h |    4 ++++
 libavcodec/utils.c   |    2 ++
 2 files changed, 6 insertions(+)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 4e8d30c..10a2083 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3889,6 +3889,10 @@ typedef struct AVCodecParameters {
      * Corresponds to nBlockAlign in WAVEFORMATEX.
      */
     int      block_align;
+    /**
+     * Audio only. Audio frame size, if known. Required by some formats to be static.
+     */
+    int      frame_size;
 
     /**
      * Audio only. The amount of padding (in samples) inserted by the encoder at
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 55a1379..0341686 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3783,6 +3783,7 @@ int avcodec_parameters_from_context(AVCodecParameters *par,
         par->channels        = codec->channels;
         par->sample_rate     = codec->sample_rate;
         par->block_align     = codec->block_align;
+        par->frame_size      = codec->frame_size;
         par->initial_padding = codec->initial_padding;
         par->seek_preroll    = codec->seek_preroll;
         break;
@@ -3830,6 +3831,7 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
         codec->channels        = par->channels;
         codec->sample_rate     = par->sample_rate;
         codec->block_align     = par->block_align;
+        codec->frame_size      = par->frame_size;
         codec->initial_padding = par->initial_padding;
         codec->seek_preroll    = par->seek_preroll;
         break;



More information about the ffmpeg-cvslog mailing list