1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

swr: add sample format to AudioData

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-04-29 15:30:07 +02:00
parent 2d6c29f566
commit 106789dfa0
2 changed files with 2 additions and 0 deletions

View File

@ -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);
}

View File

@ -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 {