[FFmpeg-cvslog] swr: add sample format to AudioData

Michael Niedermayer git at videolan.org
Sun Apr 29 15:45:13 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 29 15:30:07 2012 +0200| [106789dfa0cb19142cf8d8dfd38bd006b393a3c2] | committer: Michael Niedermayer

swr: add sample format to AudioData

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libswresample/swresample.c          |    1 +
 libswresample/swresample_internal.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 9297a44..7f545e0 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -154,6 +154,7 @@ struct SwrContext *swr_alloc_set_opts(struct SwrContext *s,
 }
 
 static void set_audiodata_fmt(AudioData *a, enum AVSampleFormat fmt){
+    a->fmt   = fmt;
     a->bps   = av_get_bytes_per_sample(fmt);
     a->planar= av_sample_fmt_is_planar(fmt);
 }
diff --git a/libswresample/swresample_internal.h b/libswresample/swresample_internal.h
index 4f2e9ee..bd46976 100644
--- a/libswresample/swresample_internal.h
+++ b/libswresample/swresample_internal.h
@@ -30,6 +30,7 @@ typedef struct AudioData{
     int bps;                    ///< bytes per sample
     int count;                  ///< number of samples
     int planar;                 ///< 1 if planar audio, 0 otherwise
+    enum AVSampleFormat fmt;    ///< sample format
 } AudioData;
 
 struct SwrContext {



More information about the ffmpeg-cvslog mailing list