History

avcodec/pcm-blurayenc: fix flawed logic in previous change

Paul B Mahol committed 4 years ago

Commit a84b95d1 parent b67572c1 file · +2 −6Browse files

Unified · Split

libavcodec/pcm-blurayenc.c+2−6
@@ -38,11 +38,11 @@ static av_cold int pcm_bluray_encode_init(AVCodecContext *avctx) · 37 unmodified lines
3838 switch (avctx->sample_fmt) {
3939 case AV_SAMPLE_FMT_S16:
4040 avctx->bits_per_coded_sample = 16;
41− frame_size = 120;
41+ frame_size = 240;
4242 quant = 1;
4343 break;
4444 case AV_SAMPLE_FMT_S32:
45− frame_size = 180;
45+ frame_size = 360;
4646 avctx->bits_per_coded_sample = 24;
4747 quant = 3;
4848 break;
@@ -55,19 +55,15 @@ static av_cold int pcm_bluray_encode_init(AVCodecContext *avctx) · 6 unmodified lines
5555 freq = 1;
5656 break;
5757 case 96000:
58− frame_size *= 2;
5958 freq = 4;
6059 break;
6160 case 192000:
62− frame_size *= 4;
6361 freq = 5;
6462 break;
6563 default:
6664 return AVERROR_BUG;
6765 }
6866
69− frame_size *= avctx->ch_layout.nb_channels;
70−
7167 switch (avctx->ch_layout.u.mask) {
7268 case AV_CH_LAYOUT_MONO:
7369 ch_layout = 1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t