This was missed when the original commits were done. FF_PROFILE_UNKNOWN is what's in avctx->profile when no audio profile is specified.
Unified · Split
| @@ -786,11 +786,12 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) · 785 unmodified lines | |||
| 786 | "Too many bits per frame requested, clamping to max\n"); | 786 | "Too many bits per frame requested, clamping to max\n"); |
| 787 | if (avctx->profile == FF_PROFILE_AAC_MAIN) { | 787 | if (avctx->profile == FF_PROFILE_AAC_MAIN) { |
| 788 | s->options.pred = 1; | 788 | s->options.pred = 1; |
| 789 | } else if (avctx->profile == FF_PROFILE_AAC_LOW && s->options.pred) { | 789 | } else if ((avctx->profile == FF_PROFILE_AAC_LOW || |
| 790 | avctx->profile == FF_PROFILE_UNKNOWN) && s->options.pred) { | ||
| 790 | s->profile = 0; /* Main */ | 791 | s->profile = 0; /* Main */ |
| 791 | WARN_IF(1, "Prediction requested, changing profile to AAC-Main\n"); | 792 | WARN_IF(1, "Prediction requested, changing profile to AAC-Main\n"); |
| 792 | } else if (avctx->profile == FF_PROFILE_AAC_LOW || | 793 | } else if (avctx->profile == FF_PROFILE_AAC_LOW || |
| 793 | avctx->profile == FF_PROFILE_UNKNOWN) { | 794 | avctx->profile == FF_PROFILE_UNKNOWN) { |
| 794 | s->profile = 1; /* Low */ | 795 | s->profile = 1; /* Low */ |
| 795 | } else { | 796 | } else { |
| 796 | ERROR_IF(1, "Unsupported profile %d\n", avctx->profile); | 797 | ERROR_IF(1, "Unsupported profile %d\n", avctx->profile); |