Commit 106789df authored by Michael Niedermayer's avatar Michael Niedermayer

swr: add sample format to AudioData

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2d6c29f5
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment