Browse Source

swr: add sample format to AudioData

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 13 years ago
parent
commit
106789dfa0
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      libswresample/swresample.c
  2. +1
    -0
      libswresample/swresample_internal.h

+ 1
- 0
libswresample/swresample.c 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);
}


+ 1
- 0
libswresample/swresample_internal.h 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 {


Loading…
Cancel
Save