mirror of https://git.ffmpeg.org/ffmpeg.git
swr: add sample format to AudioData
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
2d6c29f566
commit
106789dfa0
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue