diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-29 15:30:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-29 15:32:18 +0200 |
commit | 106789dfa0cb19142cf8d8dfd38bd006b393a3c2 (patch) | |
tree | f840bb2f861c446c213b73bb0780d7be70b4bccc | |
parent | 2d6c29f5663afecec250f81a74c612bbadee1c71 (diff) | |
download | ffmpeg-106789dfa0cb19142cf8d8dfd38bd006b393a3c2.tar.gz |
swr: add sample format to AudioData
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libswresample/swresample.c | 1 | ||||
-rw-r--r-- | libswresample/swresample_internal.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 9297a44ebd..7f545e0aee 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 4f2e9ee4b0..bd46976812 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 { |