Unified · Split
| @@ -1193,11 +1193,6 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx) · 1192 unmodified lines | ||
| 1193 | 1193 | ac->avctx = avctx; |
| 1194 | 1194 | ac->oc[1].m4ac.sample_rate = avctx->sample_rate; |
| 1195 | 1195 | |
| 1196 | − if (ac->is_fixed) | |
| 1197 | − avctx->sample_fmt = AV_SAMPLE_FMT_S32P; | |
| 1198 | − else | |
| 1199 | − avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; | |
| 1200 | − | |
| 1201 | 1196 | if (avctx->extradata_size > 0) { |
| 1202 | 1197 | if ((ret = decode_audio_specific_config(ac, ac->avctx, &ac->oc[1].m4ac, |
| 1203 | 1198 | avctx->extradata, |
| @@ -1247,14 +1242,20 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx) · 43 unmodified lines | ||
| 1247 | 1242 | static av_cold int aac_decode_init(AVCodecContext *avctx) |
| 1248 | 1243 | { |
| 1249 | 1244 | AACDecContext *ac = avctx->priv_data; |
| 1245 | + | |
| 1250 | 1246 | ac->is_fixed = 0; |
| 1247 | + avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; | |
| 1248 | + | |
| 1251 | 1249 | return aac_decode_init_internal(avctx); |
| 1252 | 1250 | } |
| 1253 | 1251 | |
| 1254 | 1252 | static av_cold int aac_decode_init_fixed(AVCodecContext *avctx) |
| 1255 | 1253 | { |
| 1256 | 1254 | AACDecContext *ac = avctx->priv_data; |
| 1255 | + | |
| 1257 | 1256 | ac->is_fixed = 1; |
| 1257 | + avctx->sample_fmt = AV_SAMPLE_FMT_S32P; | |
| 1258 | + | |
| 1258 | 1259 | return aac_decode_init_internal(avctx); |
| 1259 | 1260 | } |
| 1260 | 1261 | |