Permalink
Browse files

swr: add sample format to AudioData

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
1 parent 2d6c29f commit 106789dfa0cb19142cf8d8dfd38bd006b393a3c2 @michaelni michaelni committed Apr 29, 2012
Showing with 2 additions and 0 deletions.
  1. +1 −0 libswresample/swresample.c
  2. +1 −0 libswresample/swresample_internal.h
@@ -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);
}
@@ -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 {

0 comments on commit 106789d

Please sign in to comment.