diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index b9c3400..8d234ed 100644
|
a
|
b
|
typedef struct ALACContext {
|
| 76 | 76 | uint8_t rice_history_mult; |
| 77 | 77 | uint8_t rice_initial_history; |
| 78 | 78 | uint8_t rice_limit; |
| | 79 | int sample_rate; |
| 79 | 80 | |
| 80 | 81 | int extra_bits; /**< number of extra bits beyond 16-bit */ |
| 81 | 82 | int nb_samples; /**< number of samples in the current frame */ |
| … |
… |
static int alac_set_info(ALACContext *alac)
|
| 538 | 539 | bytestream2_get_be16u(&gb); // maxRun |
| 539 | 540 | bytestream2_get_be32u(&gb); // max coded frame size |
| 540 | 541 | bytestream2_get_be32u(&gb); // average bitrate |
| 541 | | bytestream2_get_be32u(&gb); // samplerate |
| | 542 | alac->sample_rate = bytestream2_get_be32u(&gb); |
| 542 | 543 | |
| 543 | 544 | return 0; |
| 544 | 545 | } |
| … |
… |
static av_cold int alac_decode_init(AVCodecContext * avctx)
|
| 570 | 571 | return AVERROR_PATCHWELCOME; |
| 571 | 572 | } |
| 572 | 573 | avctx->bits_per_raw_sample = alac->sample_size; |
| | 574 | avctx->sample_rate = alac->sample_rate; |
| 573 | 575 | |
| 574 | 576 | if (alac->channels < 1) { |
| 575 | 577 | av_log(avctx, AV_LOG_WARNING, "Invalid channel count\n"); |