Unified · Split
| @@ -154,6 +154,7 @@ struct SwrContext *swr_alloc_set_opts(struct SwrContext *s, · 153 unmodified lines | ||
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | static void set_audiodata_fmt(AudioData *a, enum AVSampleFormat fmt){ |
| 157 | + a->fmt = fmt; | |
| 157 | 158 | a->bps = av_get_bytes_per_sample(fmt); |
| 158 | 159 | a->planar= av_sample_fmt_is_planar(fmt); |
| 159 | 160 | } |
| @@ -30,6 +30,7 @@ typedef struct AudioData{ · 29 unmodified lines | ||
| 30 | 30 | int bps; ///< bytes per sample |
| 31 | 31 | int count; ///< number of samples |
| 32 | 32 | int planar; ///< 1 if planar audio, 0 otherwise |
| 33 | + enum AVSampleFormat fmt; ///< sample format | |
| 33 | 34 | } AudioData; |
| 34 | 35 | |
| 35 | 36 | struct SwrContext { |