aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/s302m.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/s302m.c')
-rw-r--r--libavcodec/s302m.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c
index 7639a0f1c9..2ce1038330 100644
--- a/libavcodec/s302m.c
+++ b/libavcodec/s302m.c
@@ -79,7 +79,6 @@ static int s302m_parse_frame_header(AVCodecContext *avctx, const uint8_t *buf,
case 8:
avctx->channel_layout = AV_CH_LAYOUT_5POINT1_BACK | AV_CH_LAYOUT_STEREO_DOWNMIX;
}
- avctx->sample_rate = 48000;
avctx->bit_rate = 48000 * avctx->channels * (avctx->bits_per_raw_sample + 4) +
32 * (48000 / (buf_size * 8 /
(avctx->channels *
@@ -146,6 +145,8 @@ static int s302m_decode_frame(AVCodecContext *avctx, void *data,
}
}
+ avctx->sample_rate = 48000;
+
*got_frame_ptr = 1;
return avpkt->size;