Unified · Split
| @@ -38,11 +38,11 @@ static av_cold int pcm_bluray_encode_init(AVCodecContext *avctx) · 37 unmodified lines | |||
| 38 | switch (avctx->sample_fmt) { | 38 | switch (avctx->sample_fmt) { |
| 39 | case AV_SAMPLE_FMT_S16: | 39 | case AV_SAMPLE_FMT_S16: |
| 40 | avctx->bits_per_coded_sample = 16; | 40 | avctx->bits_per_coded_sample = 16; |
| 41 | frame_size = 120; | 41 | frame_size = 240; |
| 42 | quant = 1; | 42 | quant = 1; |
| 43 | break; | 43 | break; |
| 44 | case AV_SAMPLE_FMT_S32: | 44 | case AV_SAMPLE_FMT_S32: |
| 45 | frame_size = 180; | 45 | frame_size = 360; |
| 46 | avctx->bits_per_coded_sample = 24; | 46 | avctx->bits_per_coded_sample = 24; |
| 47 | quant = 3; | 47 | quant = 3; |
| 48 | break; | 48 | break; |
| @@ -55,19 +55,15 @@ static av_cold int pcm_bluray_encode_init(AVCodecContext *avctx) · 6 unmodified lines | |||
| 55 | freq = 1; | 55 | freq = 1; |
| 56 | break; | 56 | break; |
| 57 | case 96000: | 57 | case 96000: |
| 58 | frame_size *= 2; | ||
| 59 | freq = 4; | 58 | freq = 4; |
| 60 | break; | 59 | break; |
| 61 | case 192000: | 60 | case 192000: |
| 62 | frame_size *= 4; | ||
| 63 | freq = 5; | 61 | freq = 5; |
| 64 | break; | 62 | break; |
| 65 | default: | 63 | default: |
| 66 | return AVERROR_BUG; | 64 | return AVERROR_BUG; |
| 67 | } | 65 | } |
| 68 | 66 | ||
| 69 | frame_size *= avctx->ch_layout.nb_channels; | ||
| 70 | |||
| 71 | switch (avctx->ch_layout.u.mask) { | 67 | switch (avctx->ch_layout.u.mask) { |
| 72 | case AV_CH_LAYOUT_MONO: | 68 | case AV_CH_LAYOUT_MONO: |
| 73 | ch_layout = 1; | 69 | ch_layout = 1; |