Originally committed as revision 23488 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -120,7 +120,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id) |
| 120 | 120 |
int err_printed = 0; |
| 121 | 121 |
while (ac->tags_seen_this_frame[type][elem_id] && elem_id < MAX_ELEM_ID) {
|
| 122 | 122 |
if (ac->output_configured < OC_LOCKED && !err_printed) {
|
| 123 |
- av_log(ac->avccontext, AV_LOG_WARNING, "Duplicate channel tag found, attempting to remap.\n"); |
|
| 123 |
+ av_log(ac->avctx, AV_LOG_WARNING, "Duplicate channel tag found, attempting to remap.\n"); |
|
| 124 | 124 |
err_printed = 1; |
| 125 | 125 |
} |
| 126 | 126 |
elem_id++; |
| ... | ... |
@@ -225,7 +225,7 @@ static av_cold int output_configure(AACContext *ac, |
| 225 | 225 |
enum ChannelPosition new_che_pos[4][MAX_ELEM_ID], |
| 226 | 226 |
int channel_config, enum OCStatus oc_type) |
| 227 | 227 |
{
|
| 228 |
- AVCodecContext *avctx = ac->avccontext; |
|
| 228 |
+ AVCodecContext *avctx = ac->avctx; |
|
| 229 | 229 |
int i, type, channels = 0, ret; |
| 230 | 230 |
|
| 231 | 231 |
memcpy(che_pos, new_che_pos, 4 * MAX_ELEM_ID * sizeof(new_che_pos[0][0])); |
| ... | ... |
@@ -308,7 +308,7 @@ static int decode_pce(AACContext *ac, enum ChannelPosition new_che_pos[4][MAX_EL |
| 308 | 308 |
|
| 309 | 309 |
sampling_index = get_bits(gb, 4); |
| 310 | 310 |
if (ac->m4ac.sampling_index != sampling_index) |
| 311 |
- av_log(ac->avccontext, AV_LOG_WARNING, "Sample rate index in program config element does not match the sample rate index configured by the container.\n"); |
|
| 311 |
+ av_log(ac->avctx, AV_LOG_WARNING, "Sample rate index in program config element does not match the sample rate index configured by the container.\n"); |
|
| 312 | 312 |
|
| 313 | 313 |
num_front = get_bits(gb, 4); |
| 314 | 314 |
num_side = get_bits(gb, 4); |
| ... | ... |
@@ -339,7 +339,7 @@ static int decode_pce(AACContext *ac, enum ChannelPosition new_che_pos[4][MAX_EL |
| 339 | 339 |
/* comment field, first byte is length */ |
| 340 | 340 |
comment_len = get_bits(gb, 8) * 8; |
| 341 | 341 |
if (get_bits_left(gb) < comment_len) {
|
| 342 |
- av_log(ac->avccontext, AV_LOG_ERROR, overread_err); |
|
| 342 |
+ av_log(ac->avctx, AV_LOG_ERROR, overread_err); |
|
| 343 | 343 |
return -1; |
| 344 | 344 |
} |
| 345 | 345 |
skip_bits_long(gb, comment_len); |
| ... | ... |
@@ -359,7 +359,7 @@ static av_cold int set_default_channel_config(AACContext *ac, |
| 359 | 359 |
int channel_config) |
| 360 | 360 |
{
|
| 361 | 361 |
if (channel_config < 1 || channel_config > 7) {
|
| 362 |
- av_log(ac->avccontext, AV_LOG_ERROR, "invalid default channel configuration (%d)\n", |
|
| 362 |
+ av_log(ac->avctx, AV_LOG_ERROR, "invalid default channel configuration (%d)\n", |
|
| 363 | 363 |
channel_config); |
| 364 | 364 |
return -1; |
| 365 | 365 |
} |
| ... | ... |
@@ -404,7 +404,7 @@ static int decode_ga_specific_config(AACContext *ac, GetBitContext *gb, |
| 404 | 404 |
int extension_flag, ret; |
| 405 | 405 |
|
| 406 | 406 |
if (get_bits1(gb)) { // frameLengthFlag
|
| 407 |
- av_log_missing_feature(ac->avccontext, "960/120 MDCT window is", 1); |
|
| 407 |
+ av_log_missing_feature(ac->avctx, "960/120 MDCT window is", 1); |
|
| 408 | 408 |
return -1; |
| 409 | 409 |
} |
| 410 | 410 |
|
| ... | ... |
@@ -468,7 +468,7 @@ static int decode_audio_specific_config(AACContext *ac, void *data, |
| 468 | 468 |
if ((i = ff_mpeg4audio_get_config(&ac->m4ac, data, data_size)) < 0) |
| 469 | 469 |
return -1; |
| 470 | 470 |
if (ac->m4ac.sampling_index > 12) {
|
| 471 |
- av_log(ac->avccontext, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->m4ac.sampling_index); |
|
| 471 |
+ av_log(ac->avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->m4ac.sampling_index); |
|
| 472 | 472 |
return -1; |
| 473 | 473 |
} |
| 474 | 474 |
|
| ... | ... |
@@ -481,7 +481,7 @@ static int decode_audio_specific_config(AACContext *ac, void *data, |
| 481 | 481 |
return -1; |
| 482 | 482 |
break; |
| 483 | 483 |
default: |
| 484 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Audio object type %s%d is not supported.\n", |
|
| 484 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Audio object type %s%d is not supported.\n", |
|
| 485 | 485 |
ac->m4ac.sbr == 1? "SBR+" : "", ac->m4ac.object_type); |
| 486 | 486 |
return -1; |
| 487 | 487 |
} |
| ... | ... |
@@ -524,20 +524,20 @@ static void reset_predictor_group(PredictorState *ps, int group_num) |
| 524 | 524 |
reset_predict_state(&ps[i]); |
| 525 | 525 |
} |
| 526 | 526 |
|
| 527 |
-static av_cold int aac_decode_init(AVCodecContext *avccontext) |
|
| 527 |
+static av_cold int aac_decode_init(AVCodecContext *avctx) |
|
| 528 | 528 |
{
|
| 529 |
- AACContext *ac = avccontext->priv_data; |
|
| 529 |
+ AACContext *ac = avctx->priv_data; |
|
| 530 | 530 |
int i; |
| 531 | 531 |
|
| 532 |
- ac->avccontext = avccontext; |
|
| 533 |
- ac->m4ac.sample_rate = avccontext->sample_rate; |
|
| 532 |
+ ac->avctx = avctx; |
|
| 533 |
+ ac->m4ac.sample_rate = avctx->sample_rate; |
|
| 534 | 534 |
|
| 535 |
- if (avccontext->extradata_size > 0) {
|
|
| 536 |
- if (decode_audio_specific_config(ac, avccontext->extradata, avccontext->extradata_size)) |
|
| 535 |
+ if (avctx->extradata_size > 0) {
|
|
| 536 |
+ if (decode_audio_specific_config(ac, avctx->extradata, avctx->extradata_size)) |
|
| 537 | 537 |
return -1; |
| 538 | 538 |
} |
| 539 | 539 |
|
| 540 |
- avccontext->sample_fmt = SAMPLE_FMT_S16; |
|
| 540 |
+ avctx->sample_fmt = SAMPLE_FMT_S16; |
|
| 541 | 541 |
|
| 542 | 542 |
AAC_INIT_VLC_STATIC( 0, 304); |
| 543 | 543 |
AAC_INIT_VLC_STATIC( 1, 270); |
| ... | ... |
@@ -553,7 +553,7 @@ static av_cold int aac_decode_init(AVCodecContext *avccontext) |
| 553 | 553 |
|
| 554 | 554 |
ff_aac_sbr_init(); |
| 555 | 555 |
|
| 556 |
- dsputil_init(&ac->dsp, avccontext); |
|
| 556 |
+ dsputil_init(&ac->dsp, avctx); |
|
| 557 | 557 |
|
| 558 | 558 |
ac->random_state = 0x1f2e3d4c; |
| 559 | 559 |
|
| ... | ... |
@@ -607,7 +607,7 @@ static int skip_data_stream_element(AACContext *ac, GetBitContext *gb) |
| 607 | 607 |
align_get_bits(gb); |
| 608 | 608 |
|
| 609 | 609 |
if (get_bits_left(gb) < 8 * count) {
|
| 610 |
- av_log(ac->avccontext, AV_LOG_ERROR, overread_err); |
|
| 610 |
+ av_log(ac->avctx, AV_LOG_ERROR, overread_err); |
|
| 611 | 611 |
return -1; |
| 612 | 612 |
} |
| 613 | 613 |
skip_bits_long(gb, 8 * count); |
| ... | ... |
@@ -621,7 +621,7 @@ static int decode_prediction(AACContext *ac, IndividualChannelStream *ics, |
| 621 | 621 |
if (get_bits1(gb)) {
|
| 622 | 622 |
ics->predictor_reset_group = get_bits(gb, 5); |
| 623 | 623 |
if (ics->predictor_reset_group == 0 || ics->predictor_reset_group > 30) {
|
| 624 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Invalid Predictor Reset Group.\n"); |
|
| 624 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Invalid Predictor Reset Group.\n"); |
|
| 625 | 625 |
return -1; |
| 626 | 626 |
} |
| 627 | 627 |
} |
| ... | ... |
@@ -640,7 +640,7 @@ static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics, |
| 640 | 640 |
GetBitContext *gb, int common_window) |
| 641 | 641 |
{
|
| 642 | 642 |
if (get_bits1(gb)) {
|
| 643 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Reserved bit set.\n"); |
|
| 643 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Reserved bit set.\n"); |
|
| 644 | 644 |
memset(ics, 0, sizeof(IndividualChannelStream)); |
| 645 | 645 |
return -1; |
| 646 | 646 |
} |
| ... | ... |
@@ -681,11 +681,11 @@ static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics, |
| 681 | 681 |
return -1; |
| 682 | 682 |
} |
| 683 | 683 |
} else if (ac->m4ac.object_type == AOT_AAC_LC) {
|
| 684 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Prediction is not allowed in AAC-LC.\n"); |
|
| 684 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Prediction is not allowed in AAC-LC.\n"); |
|
| 685 | 685 |
memset(ics, 0, sizeof(IndividualChannelStream)); |
| 686 | 686 |
return -1; |
| 687 | 687 |
} else {
|
| 688 |
- av_log_missing_feature(ac->avccontext, "Predictor bit set but LTP is", 1); |
|
| 688 |
+ av_log_missing_feature(ac->avctx, "Predictor bit set but LTP is", 1); |
|
| 689 | 689 |
memset(ics, 0, sizeof(IndividualChannelStream)); |
| 690 | 690 |
return -1; |
| 691 | 691 |
} |
| ... | ... |
@@ -693,7 +693,7 @@ static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics, |
| 693 | 693 |
} |
| 694 | 694 |
|
| 695 | 695 |
if (ics->max_sfb > ics->num_swb) {
|
| 696 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 696 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 697 | 697 |
"Number of scalefactor bands in group (%d) exceeds limit (%d).\n", |
| 698 | 698 |
ics->max_sfb, ics->num_swb); |
| 699 | 699 |
memset(ics, 0, sizeof(IndividualChannelStream)); |
| ... | ... |
@@ -724,18 +724,18 @@ static int decode_band_types(AACContext *ac, enum BandType band_type[120], |
| 724 | 724 |
int sect_len_incr; |
| 725 | 725 |
int sect_band_type = get_bits(gb, 4); |
| 726 | 726 |
if (sect_band_type == 12) {
|
| 727 |
- av_log(ac->avccontext, AV_LOG_ERROR, "invalid band type\n"); |
|
| 727 |
+ av_log(ac->avctx, AV_LOG_ERROR, "invalid band type\n"); |
|
| 728 | 728 |
return -1; |
| 729 | 729 |
} |
| 730 | 730 |
while ((sect_len_incr = get_bits(gb, bits)) == (1 << bits) - 1) |
| 731 | 731 |
sect_end += sect_len_incr; |
| 732 | 732 |
sect_end += sect_len_incr; |
| 733 | 733 |
if (get_bits_left(gb) < 0) {
|
| 734 |
- av_log(ac->avccontext, AV_LOG_ERROR, overread_err); |
|
| 734 |
+ av_log(ac->avctx, AV_LOG_ERROR, overread_err); |
|
| 735 | 735 |
return -1; |
| 736 | 736 |
} |
| 737 | 737 |
if (sect_end > ics->max_sfb) {
|
| 738 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 738 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 739 | 739 |
"Number of bands (%d) exceeds limit (%d).\n", |
| 740 | 740 |
sect_end, ics->max_sfb); |
| 741 | 741 |
return -1; |
| ... | ... |
@@ -780,7 +780,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb, |
| 780 | 780 |
for (; i < run_end; i++, idx++) {
|
| 781 | 781 |
offset[2] += get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60; |
| 782 | 782 |
if (offset[2] > 255U) {
|
| 783 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 783 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 784 | 784 |
"%s (%d) out of range.\n", sf_str[2], offset[2]); |
| 785 | 785 |
return -1; |
| 786 | 786 |
} |
| ... | ... |
@@ -793,7 +793,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb, |
| 793 | 793 |
else |
| 794 | 794 |
offset[1] += get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60; |
| 795 | 795 |
if (offset[1] > 255U) {
|
| 796 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 796 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 797 | 797 |
"%s (%d) out of range.\n", sf_str[1], offset[1]); |
| 798 | 798 |
return -1; |
| 799 | 799 |
} |
| ... | ... |
@@ -803,7 +803,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb, |
| 803 | 803 |
for (; i < run_end; i++, idx++) {
|
| 804 | 804 |
offset[0] += get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60; |
| 805 | 805 |
if (offset[0] > 255U) {
|
| 806 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 806 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 807 | 807 |
"%s (%d) out of range.\n", sf_str[0], offset[0]); |
| 808 | 808 |
return -1; |
| 809 | 809 |
} |
| ... | ... |
@@ -860,7 +860,7 @@ static int decode_tns(AACContext *ac, TemporalNoiseShaping *tns, |
| 860 | 860 |
tns->length[w][filt] = get_bits(gb, 6 - 2 * is8); |
| 861 | 861 |
|
| 862 | 862 |
if ((tns->order[w][filt] = get_bits(gb, 5 - 2 * is8)) > tns_max_order) {
|
| 863 |
- av_log(ac->avccontext, AV_LOG_ERROR, "TNS filter order %d is greater than maximum %d.\n", |
|
| 863 |
+ av_log(ac->avctx, AV_LOG_ERROR, "TNS filter order %d is greater than maximum %d.\n", |
|
| 864 | 864 |
tns->order[w][filt], tns_max_order); |
| 865 | 865 |
tns->order[w][filt] = 0; |
| 866 | 866 |
return -1; |
| ... | ... |
@@ -1179,7 +1179,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, float coef[1024], |
| 1179 | 1179 |
b = 31 - av_log2(~b); |
| 1180 | 1180 |
|
| 1181 | 1181 |
if (b > 8) {
|
| 1182 |
- av_log(ac->avccontext, AV_LOG_ERROR, "error in spectral data, ESC overflow\n"); |
|
| 1182 |
+ av_log(ac->avctx, AV_LOG_ERROR, "error in spectral data, ESC overflow\n"); |
|
| 1183 | 1183 |
return -1; |
| 1184 | 1184 |
} |
| 1185 | 1185 |
|
| ... | ... |
@@ -1232,7 +1232,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, float coef[1024], |
| 1232 | 1232 |
return 0; |
| 1233 | 1233 |
|
| 1234 | 1234 |
err_cb_overflow: |
| 1235 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 1235 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 1236 | 1236 |
"Read beyond end of ff_aac_codebook_vectors[%d][]. index %d >= %d\n", |
| 1237 | 1237 |
band_type[idx], err_idx, ff_aac_spectral_sizes[band_type[idx]]); |
| 1238 | 1238 |
return -1; |
| ... | ... |
@@ -1353,18 +1353,18 @@ static int decode_ics(AACContext *ac, SingleChannelElement *sce, |
| 1353 | 1353 |
if (!scale_flag) {
|
| 1354 | 1354 |
if ((pulse_present = get_bits1(gb))) {
|
| 1355 | 1355 |
if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
|
| 1356 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Pulse tool not allowed in eight short sequence.\n"); |
|
| 1356 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Pulse tool not allowed in eight short sequence.\n"); |
|
| 1357 | 1357 |
return -1; |
| 1358 | 1358 |
} |
| 1359 | 1359 |
if (decode_pulses(&pulse, gb, ics->swb_offset, ics->num_swb)) {
|
| 1360 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Pulse data corrupt or invalid.\n"); |
|
| 1360 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Pulse data corrupt or invalid.\n"); |
|
| 1361 | 1361 |
return -1; |
| 1362 | 1362 |
} |
| 1363 | 1363 |
} |
| 1364 | 1364 |
if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics)) |
| 1365 | 1365 |
return -1; |
| 1366 | 1366 |
if (get_bits1(gb)) {
|
| 1367 |
- av_log_missing_feature(ac->avccontext, "SSR", 1); |
|
| 1367 |
+ av_log_missing_feature(ac->avctx, "SSR", 1); |
|
| 1368 | 1368 |
return -1; |
| 1369 | 1369 |
} |
| 1370 | 1370 |
} |
| ... | ... |
@@ -1464,7 +1464,7 @@ static int decode_cpe(AACContext *ac, GetBitContext *gb, ChannelElement *cpe) |
| 1464 | 1464 |
cpe->ch[1].ics.use_kb_window[1] = i; |
| 1465 | 1465 |
ms_present = get_bits(gb, 2); |
| 1466 | 1466 |
if (ms_present == 3) {
|
| 1467 |
- av_log(ac->avccontext, AV_LOG_ERROR, "ms_present = 3 is reserved.\n"); |
|
| 1467 |
+ av_log(ac->avctx, AV_LOG_ERROR, "ms_present = 3 is reserved.\n"); |
|
| 1468 | 1468 |
return -1; |
| 1469 | 1469 |
} else if (ms_present) |
| 1470 | 1470 |
decode_mid_side_stereo(cpe, gb, ms_present); |
| ... | ... |
@@ -1651,14 +1651,14 @@ static int decode_extension_payload(AACContext *ac, GetBitContext *gb, int cnt, |
| 1651 | 1651 |
crc_flag++; |
| 1652 | 1652 |
case EXT_SBR_DATA: |
| 1653 | 1653 |
if (!che) {
|
| 1654 |
- av_log(ac->avccontext, AV_LOG_ERROR, "SBR was found before the first channel element.\n"); |
|
| 1654 |
+ av_log(ac->avctx, AV_LOG_ERROR, "SBR was found before the first channel element.\n"); |
|
| 1655 | 1655 |
return res; |
| 1656 | 1656 |
} else if (!ac->m4ac.sbr) {
|
| 1657 |
- av_log(ac->avccontext, AV_LOG_ERROR, "SBR signaled to be not-present but was found in the bitstream.\n"); |
|
| 1657 |
+ av_log(ac->avctx, AV_LOG_ERROR, "SBR signaled to be not-present but was found in the bitstream.\n"); |
|
| 1658 | 1658 |
skip_bits_long(gb, 8 * cnt - 4); |
| 1659 | 1659 |
return res; |
| 1660 | 1660 |
} else if (ac->m4ac.sbr == -1 && ac->output_configured == OC_LOCKED) {
|
| 1661 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Implicit SBR was found with a first occurrence after the first frame.\n"); |
|
| 1661 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Implicit SBR was found with a first occurrence after the first frame.\n"); |
|
| 1662 | 1662 |
skip_bits_long(gb, 8 * cnt - 4); |
| 1663 | 1663 |
return res; |
| 1664 | 1664 |
} else {
|
| ... | ... |
@@ -1744,7 +1744,7 @@ static void imdct_and_windowing(AACContext *ac, SingleChannelElement *sce, float |
| 1744 | 1744 |
// imdct |
| 1745 | 1745 |
if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
|
| 1746 | 1746 |
if (ics->window_sequence[1] == ONLY_LONG_SEQUENCE || ics->window_sequence[1] == LONG_STOP_SEQUENCE) |
| 1747 |
- av_log(ac->avccontext, AV_LOG_WARNING, |
|
| 1747 |
+ av_log(ac->avctx, AV_LOG_WARNING, |
|
| 1748 | 1748 |
"Transition from an ONLY_LONG or LONG_STOP to an EIGHT_SHORT sequence detected. " |
| 1749 | 1749 |
"If you heard an audible artifact, please submit the sample to the FFmpeg developers.\n"); |
| 1750 | 1750 |
for (i = 0; i < 1024; i += 128) |
| ... | ... |
@@ -1810,7 +1810,7 @@ static void apply_dependent_coupling(AACContext *ac, |
| 1810 | 1810 |
const float *src = cce->ch[0].coeffs; |
| 1811 | 1811 |
int g, i, group, k, idx = 0; |
| 1812 | 1812 |
if (ac->m4ac.object_type == AOT_AAC_LTP) {
|
| 1813 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 1813 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 1814 | 1814 |
"Dependent coupling is not supported together with LTP\n"); |
| 1815 | 1815 |
return; |
| 1816 | 1816 |
} |
| ... | ... |
@@ -1945,25 +1945,25 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb) |
| 1945 | 1945 |
ac->m4ac.sample_rate = hdr_info.sample_rate; |
| 1946 | 1946 |
ac->m4ac.sampling_index = hdr_info.sampling_index; |
| 1947 | 1947 |
ac->m4ac.object_type = hdr_info.object_type; |
| 1948 |
- if (!ac->avccontext->sample_rate) |
|
| 1949 |
- ac->avccontext->sample_rate = hdr_info.sample_rate; |
|
| 1948 |
+ if (!ac->avctx->sample_rate) |
|
| 1949 |
+ ac->avctx->sample_rate = hdr_info.sample_rate; |
|
| 1950 | 1950 |
if (hdr_info.num_aac_frames == 1) {
|
| 1951 | 1951 |
if (!hdr_info.crc_absent) |
| 1952 | 1952 |
skip_bits(gb, 16); |
| 1953 | 1953 |
} else {
|
| 1954 |
- av_log_missing_feature(ac->avccontext, "More than one AAC RDB per ADTS frame is", 0); |
|
| 1954 |
+ av_log_missing_feature(ac->avctx, "More than one AAC RDB per ADTS frame is", 0); |
|
| 1955 | 1955 |
return -1; |
| 1956 | 1956 |
} |
| 1957 | 1957 |
} |
| 1958 | 1958 |
return size; |
| 1959 | 1959 |
} |
| 1960 | 1960 |
|
| 1961 |
-static int aac_decode_frame(AVCodecContext *avccontext, void *data, |
|
| 1961 |
+static int aac_decode_frame(AVCodecContext *avctx, void *data, |
|
| 1962 | 1962 |
int *data_size, AVPacket *avpkt) |
| 1963 | 1963 |
{
|
| 1964 | 1964 |
const uint8_t *buf = avpkt->data; |
| 1965 | 1965 |
int buf_size = avpkt->size; |
| 1966 |
- AACContext *ac = avccontext->priv_data; |
|
| 1966 |
+ AACContext *ac = avctx->priv_data; |
|
| 1967 | 1967 |
ChannelElement *che = NULL, *che_prev = NULL; |
| 1968 | 1968 |
GetBitContext gb; |
| 1969 | 1969 |
enum RawDataBlockType elem_type, elem_type_prev = TYPE_END; |
| ... | ... |
@@ -1976,11 +1976,11 @@ static int aac_decode_frame(AVCodecContext *avccontext, void *data, |
| 1976 | 1976 |
|
| 1977 | 1977 |
if (show_bits(&gb, 12) == 0xfff) {
|
| 1978 | 1978 |
if (parse_adts_frame_header(ac, &gb) < 0) {
|
| 1979 |
- av_log(avccontext, AV_LOG_ERROR, "Error decoding AAC frame header.\n"); |
|
| 1979 |
+ av_log(avctx, AV_LOG_ERROR, "Error decoding AAC frame header.\n"); |
|
| 1980 | 1980 |
return -1; |
| 1981 | 1981 |
} |
| 1982 | 1982 |
if (ac->m4ac.sampling_index > 12) {
|
| 1983 |
- av_log(ac->avccontext, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->m4ac.sampling_index); |
|
| 1983 |
+ av_log(ac->avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->m4ac.sampling_index); |
|
| 1984 | 1984 |
return -1; |
| 1985 | 1985 |
} |
| 1986 | 1986 |
} |
| ... | ... |
@@ -1991,7 +1991,7 @@ static int aac_decode_frame(AVCodecContext *avccontext, void *data, |
| 1991 | 1991 |
elem_id = get_bits(&gb, 4); |
| 1992 | 1992 |
|
| 1993 | 1993 |
if (elem_type < TYPE_DSE && !(che=get_che(ac, elem_type, elem_id))) {
|
| 1994 |
- av_log(ac->avccontext, AV_LOG_ERROR, "channel element %d.%d is not allocated\n", elem_type, elem_id); |
|
| 1994 |
+ av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n", elem_type, elem_id); |
|
| 1995 | 1995 |
return -1; |
| 1996 | 1996 |
} |
| 1997 | 1997 |
|
| ... | ... |
@@ -2023,7 +2023,7 @@ static int aac_decode_frame(AVCodecContext *avccontext, void *data, |
| 2023 | 2023 |
if ((err = decode_pce(ac, new_che_pos, &gb))) |
| 2024 | 2024 |
break; |
| 2025 | 2025 |
if (ac->output_configured > OC_TRIAL_PCE) |
| 2026 |
- av_log(avccontext, AV_LOG_ERROR, |
|
| 2026 |
+ av_log(avctx, AV_LOG_ERROR, |
|
| 2027 | 2027 |
"Not evaluating a further program_config_element as this construct is dubious at best.\n"); |
| 2028 | 2028 |
else |
| 2029 | 2029 |
err = output_configure(ac, ac->che_pos, new_che_pos, 0, OC_TRIAL_PCE); |
| ... | ... |
@@ -2034,7 +2034,7 @@ static int aac_decode_frame(AVCodecContext *avccontext, void *data, |
| 2034 | 2034 |
if (elem_id == 15) |
| 2035 | 2035 |
elem_id += get_bits(&gb, 8) - 1; |
| 2036 | 2036 |
if (get_bits_left(&gb) < 8 * elem_id) {
|
| 2037 |
- av_log(avccontext, AV_LOG_ERROR, overread_err); |
|
| 2037 |
+ av_log(avctx, AV_LOG_ERROR, overread_err); |
|
| 2038 | 2038 |
return -1; |
| 2039 | 2039 |
} |
| 2040 | 2040 |
while (elem_id > 0) |
| ... | ... |
@@ -2054,7 +2054,7 @@ static int aac_decode_frame(AVCodecContext *avccontext, void *data, |
| 2054 | 2054 |
return err; |
| 2055 | 2055 |
|
| 2056 | 2056 |
if (get_bits_left(&gb) < 3) {
|
| 2057 |
- av_log(avccontext, AV_LOG_ERROR, overread_err); |
|
| 2057 |
+ av_log(avctx, AV_LOG_ERROR, overread_err); |
|
| 2058 | 2058 |
return -1; |
| 2059 | 2059 |
} |
| 2060 | 2060 |
} |
| ... | ... |
@@ -2064,20 +2064,20 @@ static int aac_decode_frame(AVCodecContext *avccontext, void *data, |
| 2064 | 2064 |
multiplier = (ac->m4ac.sbr == 1) ? ac->m4ac.ext_sample_rate > ac->m4ac.sample_rate : 0; |
| 2065 | 2065 |
samples <<= multiplier; |
| 2066 | 2066 |
if (ac->output_configured < OC_LOCKED) {
|
| 2067 |
- avccontext->sample_rate = ac->m4ac.sample_rate << multiplier; |
|
| 2068 |
- avccontext->frame_size = samples; |
|
| 2067 |
+ avctx->sample_rate = ac->m4ac.sample_rate << multiplier; |
|
| 2068 |
+ avctx->frame_size = samples; |
|
| 2069 | 2069 |
} |
| 2070 | 2070 |
|
| 2071 |
- data_size_tmp = samples * avccontext->channels * sizeof(int16_t); |
|
| 2071 |
+ data_size_tmp = samples * avctx->channels * sizeof(int16_t); |
|
| 2072 | 2072 |
if (*data_size < data_size_tmp) {
|
| 2073 |
- av_log(avccontext, AV_LOG_ERROR, |
|
| 2073 |
+ av_log(avctx, AV_LOG_ERROR, |
|
| 2074 | 2074 |
"Output buffer too small (%d) or trying to output too many samples (%d) for this frame.\n", |
| 2075 | 2075 |
*data_size, data_size_tmp); |
| 2076 | 2076 |
return -1; |
| 2077 | 2077 |
} |
| 2078 | 2078 |
*data_size = data_size_tmp; |
| 2079 | 2079 |
|
| 2080 |
- ac->dsp.float_to_int16_interleave(data, (const float **)ac->output_data, samples, avccontext->channels); |
|
| 2080 |
+ ac->dsp.float_to_int16_interleave(data, (const float **)ac->output_data, samples, avctx->channels); |
|
| 2081 | 2081 |
|
| 2082 | 2082 |
if (ac->output_configured) |
| 2083 | 2083 |
ac->output_configured = OC_LOCKED; |
| ... | ... |
@@ -2090,9 +2090,9 @@ static int aac_decode_frame(AVCodecContext *avccontext, void *data, |
| 2090 | 2090 |
return buf_size > buf_offset ? buf_consumed : buf_size; |
| 2091 | 2091 |
} |
| 2092 | 2092 |
|
| 2093 |
-static av_cold int aac_decode_close(AVCodecContext *avccontext) |
|
| 2093 |
+static av_cold int aac_decode_close(AVCodecContext *avctx) |
|
| 2094 | 2094 |
{
|
| 2095 |
- AACContext *ac = avccontext->priv_data; |
|
| 2095 |
+ AACContext *ac = avctx->priv_data; |
|
| 2096 | 2096 |
int i, type; |
| 2097 | 2097 |
|
| 2098 | 2098 |
for (i = 0; i < MAX_ELEM_ID; i++) {
|
| ... | ... |
@@ -293,15 +293,15 @@ static void make_bands(int16_t* bands, int start, int stop, int num_bands) |
| 293 | 293 |
bands[num_bands-1] = stop - previous; |
| 294 | 294 |
} |
| 295 | 295 |
|
| 296 |
-static int check_n_master(AVCodecContext *avccontext, int n_master, int bs_xover_band) |
|
| 296 |
+static int check_n_master(AVCodecContext *avctx, int n_master, int bs_xover_band) |
|
| 297 | 297 |
{
|
| 298 | 298 |
// Requirements (14496-3 sp04 p205) |
| 299 | 299 |
if (n_master <= 0) {
|
| 300 |
- av_log(avccontext, AV_LOG_ERROR, "Invalid n_master: %d\n", n_master); |
|
| 300 |
+ av_log(avctx, AV_LOG_ERROR, "Invalid n_master: %d\n", n_master); |
|
| 301 | 301 |
return -1; |
| 302 | 302 |
} |
| 303 | 303 |
if (bs_xover_band >= n_master) {
|
| 304 |
- av_log(avccontext, AV_LOG_ERROR, |
|
| 304 |
+ av_log(avctx, AV_LOG_ERROR, |
|
| 305 | 305 |
"Invalid bitstream, crossover band index beyond array bounds: %d\n", |
| 306 | 306 |
bs_xover_band); |
| 307 | 307 |
return -1; |
| ... | ... |
@@ -349,7 +349,7 @@ static int sbr_make_f_master(AACContext *ac, SpectralBandReplication *sbr, |
| 349 | 349 |
sbr_offset_ptr = sbr_offset[5]; |
| 350 | 350 |
break; |
| 351 | 351 |
default: |
| 352 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 352 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 353 | 353 |
"Unsupported sample rate for SBR: %d\n", sbr->sample_rate); |
| 354 | 354 |
return -1; |
| 355 | 355 |
} |
| ... | ... |
@@ -367,7 +367,7 @@ static int sbr_make_f_master(AACContext *ac, SpectralBandReplication *sbr, |
| 367 | 367 |
} else if (spectrum->bs_stop_freq == 15) {
|
| 368 | 368 |
sbr->k[2] = 3*sbr->k[0]; |
| 369 | 369 |
} else {
|
| 370 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 370 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 371 | 371 |
"Invalid bs_stop_freq: %d\n", spectrum->bs_stop_freq); |
| 372 | 372 |
return -1; |
| 373 | 373 |
} |
| ... | ... |
@@ -382,7 +382,7 @@ static int sbr_make_f_master(AACContext *ac, SpectralBandReplication *sbr, |
| 382 | 382 |
max_qmf_subbands = 32; |
| 383 | 383 |
|
| 384 | 384 |
if (sbr->k[2] - sbr->k[0] > max_qmf_subbands) {
|
| 385 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 385 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 386 | 386 |
"Invalid bitstream, too many QMF subbands: %d\n", sbr->k[2] - sbr->k[0]); |
| 387 | 387 |
return -1; |
| 388 | 388 |
} |
| ... | ... |
@@ -393,7 +393,7 @@ static int sbr_make_f_master(AACContext *ac, SpectralBandReplication *sbr, |
| 393 | 393 |
|
| 394 | 394 |
dk = spectrum->bs_alter_scale + 1; |
| 395 | 395 |
sbr->n_master = ((sbr->k[2] - sbr->k[0] + (dk&2)) >> dk) << 1; |
| 396 |
- if (check_n_master(ac->avccontext, sbr->n_master, sbr->spectrum_params.bs_xover_band)) |
|
| 396 |
+ if (check_n_master(ac->avctx, sbr->n_master, sbr->spectrum_params.bs_xover_band)) |
|
| 397 | 397 |
return -1; |
| 398 | 398 |
|
| 399 | 399 |
for (k = 1; k <= sbr->n_master; k++) |
| ... | ... |
@@ -428,7 +428,7 @@ static int sbr_make_f_master(AACContext *ac, SpectralBandReplication *sbr, |
| 428 | 428 |
num_bands_0 = lrintf(half_bands * log2f(sbr->k[1] / (float)sbr->k[0])) * 2; |
| 429 | 429 |
|
| 430 | 430 |
if (num_bands_0 <= 0) { // Requirements (14496-3 sp04 p205)
|
| 431 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Invalid num_bands_0: %d\n", num_bands_0); |
|
| 431 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Invalid num_bands_0: %d\n", num_bands_0); |
|
| 432 | 432 |
return -1; |
| 433 | 433 |
} |
| 434 | 434 |
|
| ... | ... |
@@ -442,7 +442,7 @@ static int sbr_make_f_master(AACContext *ac, SpectralBandReplication *sbr, |
| 442 | 442 |
vk0[0] = sbr->k[0]; |
| 443 | 443 |
for (k = 1; k <= num_bands_0; k++) {
|
| 444 | 444 |
if (vk0[k] <= 0) { // Requirements (14496-3 sp04 p205)
|
| 445 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Invalid vDk0[%d]: %d\n", k, vk0[k]); |
|
| 445 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Invalid vDk0[%d]: %d\n", k, vk0[k]); |
|
| 446 | 446 |
return -1; |
| 447 | 447 |
} |
| 448 | 448 |
vk0[k] += vk0[k-1]; |
| ... | ... |
@@ -472,14 +472,14 @@ static int sbr_make_f_master(AACContext *ac, SpectralBandReplication *sbr, |
| 472 | 472 |
vk1[0] = sbr->k[1]; |
| 473 | 473 |
for (k = 1; k <= num_bands_1; k++) {
|
| 474 | 474 |
if (vk1[k] <= 0) { // Requirements (14496-3 sp04 p205)
|
| 475 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Invalid vDk1[%d]: %d\n", k, vk1[k]); |
|
| 475 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Invalid vDk1[%d]: %d\n", k, vk1[k]); |
|
| 476 | 476 |
return -1; |
| 477 | 477 |
} |
| 478 | 478 |
vk1[k] += vk1[k-1]; |
| 479 | 479 |
} |
| 480 | 480 |
|
| 481 | 481 |
sbr->n_master = num_bands_0 + num_bands_1; |
| 482 |
- if (check_n_master(ac->avccontext, sbr->n_master, sbr->spectrum_params.bs_xover_band)) |
|
| 482 |
+ if (check_n_master(ac->avctx, sbr->n_master, sbr->spectrum_params.bs_xover_band)) |
|
| 483 | 483 |
return -1; |
| 484 | 484 |
memcpy(&sbr->f_master[0], vk0, |
| 485 | 485 |
(num_bands_0 + 1) * sizeof(sbr->f_master[0])); |
| ... | ... |
@@ -488,7 +488,7 @@ static int sbr_make_f_master(AACContext *ac, SpectralBandReplication *sbr, |
| 488 | 488 |
|
| 489 | 489 |
} else {
|
| 490 | 490 |
sbr->n_master = num_bands_0; |
| 491 |
- if (check_n_master(ac->avccontext, sbr->n_master, sbr->spectrum_params.bs_xover_band)) |
|
| 491 |
+ if (check_n_master(ac->avctx, sbr->n_master, sbr->spectrum_params.bs_xover_band)) |
|
| 492 | 492 |
return -1; |
| 493 | 493 |
memcpy(sbr->f_master, vk0, (num_bands_0 + 1) * sizeof(sbr->f_master[0])); |
| 494 | 494 |
} |
| ... | ... |
@@ -524,7 +524,7 @@ static int sbr_hf_calc_npatches(AACContext *ac, SpectralBandReplication *sbr) |
| 524 | 524 |
// illegal however the Coding Technologies decoder check stream has a final |
| 525 | 525 |
// count of 6 patches |
| 526 | 526 |
if (sbr->num_patches > 5) {
|
| 527 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Too many patches: %d\n", sbr->num_patches); |
|
| 527 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Too many patches: %d\n", sbr->num_patches); |
|
| 528 | 528 |
return -1; |
| 529 | 529 |
} |
| 530 | 530 |
|
| ... | ... |
@@ -563,12 +563,12 @@ static int sbr_make_f_derived(AACContext *ac, SpectralBandReplication *sbr) |
| 563 | 563 |
|
| 564 | 564 |
// Requirements (14496-3 sp04 p205) |
| 565 | 565 |
if (sbr->kx[1] + sbr->m[1] > 64) {
|
| 566 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 566 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 567 | 567 |
"Stop frequency border too high: %d\n", sbr->kx[1] + sbr->m[1]); |
| 568 | 568 |
return -1; |
| 569 | 569 |
} |
| 570 | 570 |
if (sbr->kx[1] > 32) {
|
| 571 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Start frequency border too high: %d\n", sbr->kx[1]); |
|
| 571 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Start frequency border too high: %d\n", sbr->kx[1]); |
|
| 572 | 572 |
return -1; |
| 573 | 573 |
} |
| 574 | 574 |
|
| ... | ... |
@@ -580,7 +580,7 @@ static int sbr_make_f_derived(AACContext *ac, SpectralBandReplication *sbr) |
| 580 | 580 |
sbr->n_q = FFMAX(1, lrintf(sbr->spectrum_params.bs_noise_bands * |
| 581 | 581 |
log2f(sbr->k[2] / (float)sbr->kx[1]))); // 0 <= bs_noise_bands <= 3 |
| 582 | 582 |
if (sbr->n_q > 5) {
|
| 583 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Too many noise floor scale factors: %d\n", sbr->n_q); |
|
| 583 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Too many noise floor scale factors: %d\n", sbr->n_q); |
|
| 584 | 584 |
return -1; |
| 585 | 585 |
} |
| 586 | 586 |
|
| ... | ... |
@@ -638,7 +638,7 @@ static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr, |
| 638 | 638 |
ch_data->bs_amp_res = 0; |
| 639 | 639 |
|
| 640 | 640 |
if (ch_data->bs_num_env > 4) {
|
| 641 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 641 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 642 | 642 |
"Invalid bitstream, too many SBR envelopes in FIXFIX type SBR frame: %d\n", |
| 643 | 643 |
ch_data->bs_num_env); |
| 644 | 644 |
return -1; |
| ... | ... |
@@ -693,7 +693,7 @@ static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr, |
| 693 | 693 |
ch_data->bs_num_env = num_rel_lead + num_rel_trail + 1; |
| 694 | 694 |
|
| 695 | 695 |
if (ch_data->bs_num_env > 5) {
|
| 696 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 696 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 697 | 697 |
"Invalid bitstream, too many SBR envelopes in VARVAR type SBR frame: %d\n", |
| 698 | 698 |
ch_data->bs_num_env); |
| 699 | 699 |
return -1; |
| ... | ... |
@@ -714,7 +714,7 @@ static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr, |
| 714 | 714 |
} |
| 715 | 715 |
|
| 716 | 716 |
if (bs_pointer > ch_data->bs_num_env + 1) {
|
| 717 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 717 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 718 | 718 |
"Invalid bitstream, bs_pointer points to a middle noise border outside the time borders table: %d\n", |
| 719 | 719 |
bs_pointer); |
| 720 | 720 |
return -1; |
| ... | ... |
@@ -722,7 +722,7 @@ static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr, |
| 722 | 722 |
|
| 723 | 723 |
for (i = 1; i <= ch_data->bs_num_env; i++) {
|
| 724 | 724 |
if (ch_data->t_env[i-1] > ch_data->t_env[i]) {
|
| 725 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Non monotone time borders\n"); |
|
| 725 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Non monotone time borders\n"); |
|
| 726 | 726 |
return -1; |
| 727 | 727 |
} |
| 728 | 728 |
} |
| ... | ... |
@@ -907,21 +907,21 @@ static void read_sbr_extension(AACContext *ac, SpectralBandReplication *sbr, |
| 907 | 907 |
switch (bs_extension_id) {
|
| 908 | 908 |
case EXTENSION_ID_PS: |
| 909 | 909 |
if (!ac->m4ac.ps) {
|
| 910 |
- av_log(ac->avccontext, AV_LOG_ERROR, "Parametric Stereo signaled to be not-present but was found in the bitstream.\n"); |
|
| 910 |
+ av_log(ac->avctx, AV_LOG_ERROR, "Parametric Stereo signaled to be not-present but was found in the bitstream.\n"); |
|
| 911 | 911 |
skip_bits_long(gb, *num_bits_left); // bs_fill_bits |
| 912 | 912 |
*num_bits_left = 0; |
| 913 | 913 |
} else {
|
| 914 | 914 |
#if 0 |
| 915 | 915 |
*num_bits_left -= ff_ps_data(gb, ps); |
| 916 | 916 |
#else |
| 917 |
- av_log_missing_feature(ac->avccontext, "Parametric Stereo is", 0); |
|
| 917 |
+ av_log_missing_feature(ac->avctx, "Parametric Stereo is", 0); |
|
| 918 | 918 |
skip_bits_long(gb, *num_bits_left); // bs_fill_bits |
| 919 | 919 |
*num_bits_left = 0; |
| 920 | 920 |
#endif |
| 921 | 921 |
} |
| 922 | 922 |
break; |
| 923 | 923 |
default: |
| 924 |
- av_log_missing_feature(ac->avccontext, "Reserved SBR extensions are", 1); |
|
| 924 |
+ av_log_missing_feature(ac->avctx, "Reserved SBR extensions are", 1); |
|
| 925 | 925 |
skip_bits_long(gb, *num_bits_left); // bs_fill_bits |
| 926 | 926 |
*num_bits_left = 0; |
| 927 | 927 |
break; |
| ... | ... |
@@ -1006,7 +1006,7 @@ static unsigned int read_sbr_data(AACContext *ac, SpectralBandReplication *sbr, |
| 1006 | 1006 |
return get_bits_count(gb) - cnt; |
| 1007 | 1007 |
} |
| 1008 | 1008 |
} else {
|
| 1009 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 1009 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 1010 | 1010 |
"Invalid bitstream - cannot apply SBR to element type %d\n", id_aac); |
| 1011 | 1011 |
sbr->start = 0; |
| 1012 | 1012 |
return get_bits_count(gb) - cnt; |
| ... | ... |
@@ -1033,7 +1033,7 @@ static void sbr_reset(AACContext *ac, SpectralBandReplication *sbr) |
| 1033 | 1033 |
if (err >= 0) |
| 1034 | 1034 |
err = sbr_make_f_derived(ac, sbr); |
| 1035 | 1035 |
if (err < 0) {
|
| 1036 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 1036 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 1037 | 1037 |
"SBR reset failed. Switching SBR to pure upsampling mode.\n"); |
| 1038 | 1038 |
sbr->start = 0; |
| 1039 | 1039 |
} |
| ... | ... |
@@ -1085,7 +1085,7 @@ int ff_decode_sbr_extension(AACContext *ac, SpectralBandReplication *sbr, |
| 1085 | 1085 |
bytes_read = ((num_sbr_bits + num_align_bits + 4) >> 3); |
| 1086 | 1086 |
|
| 1087 | 1087 |
if (bytes_read > cnt) {
|
| 1088 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 1088 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 1089 | 1089 |
"Expected to read %d SBR bytes actually read %d.\n", cnt, bytes_read); |
| 1090 | 1090 |
} |
| 1091 | 1091 |
return cnt; |
| ... | ... |
@@ -1380,7 +1380,7 @@ static int sbr_hf_gen(AACContext *ac, SpectralBandReplication *sbr, |
| 1380 | 1380 |
g--; |
| 1381 | 1381 |
|
| 1382 | 1382 |
if (g < 0) {
|
| 1383 |
- av_log(ac->avccontext, AV_LOG_ERROR, |
|
| 1383 |
+ av_log(ac->avctx, AV_LOG_ERROR, |
|
| 1384 | 1384 |
"ERROR : no subband found for frequency %d\n", k); |
| 1385 | 1385 |
return -1; |
| 1386 | 1386 |
} |