Credit Andrew - add new render formats for dvd_pcm.dvd and mp2; fix location of HiLo...
[goodguy/cinelerra.git] / cinelerra-5.1 / thirdparty / src / ffmpeg-6.1.patchD
diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg-6.1.patchD b/cinelerra-5.1/thirdparty/src/ffmpeg-6.1.patchD
new file mode 100644 (file)
index 0000000..874fc2a
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/libavcodec/pcm-dvdenc.c
++++ b/libavcodec/pcm-dvdenc.c
+@@ -38,6 +38,12 @@ static av_cold int pcm_dvd_encode_init(AVCodecContext *avctx)
+     int quant, freq, frame_size;
+
+     switch (avctx->sample_rate) {
++    case 32000:
++       freq = 3;
++       break;
++    case 44100:
++       freq = 2;
++       break;
+     case 48000:
+         freq = 0;
+         break;
+@@ -181,7 +187,7 @@ const FFCodec ff_pcm_dvd_encoder = {
+     .priv_data_size = sizeof(PCMDVDContext),
+     .init           = pcm_dvd_encode_init,
+     FF_CODEC_ENCODE_CB(pcm_dvd_encode_frame),
+-    .p.supported_samplerates = (const int[]) { 48000, 96000, 0},
++    .p.supported_samplerates = (const int[]) { 32000, 44100, 48000, 96000, 0},
+     CODEC_OLD_CHANNEL_LAYOUTS(AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO,
+                               AV_CH_LAYOUT_5POINT1, AV_CH_LAYOUT_7POINT1)
+     .p.ch_layouts   = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
+--
+2.43.0