Credit Andrew - add new render formats for dvd_pcm.dvd and mp2; fix location of HiLo...
[goodguy/cinelerra.git] / cinelerra-5.1 / thirdparty / src / mjpegtools-2.1.0.patch8
diff --git a/cinelerra-5.1/thirdparty/src/mjpegtools-2.1.0.patch8 b/cinelerra-5.1/thirdparty/src/mjpegtools-2.1.0.patch8
new file mode 100644 (file)
index 0000000..610f94e
--- /dev/null
@@ -0,0 +1,34 @@
+Index: mplex/lpcmstrm_in.cpp
+===================================================================
+--- ./mplex/lpcmstrm_in.cpp    (revision 3507)
++++ ./mplex/lpcmstrm_in.cpp    (working copy)
+@@ -306,7 +306,15 @@
+     default : bps_code = 3; break;
+     }
+     dst[4] = starting_frame_index;
+-    unsigned int bsf_code = (samples_per_second == 48000) ? 0 : 1;
++    unsigned int bsf_code;
++    switch(samples_per_second)
++    {
++    case 48000: bsf_code = 0; break;
++    case 96000: bsf_code = 1; break;
++    case 44100: bsf_code = 2; break;
++    case 32000: bsf_code = 3; break;
++    }
++    //unsigned int bsf_code = (samples_per_second == 48000) ? 0 : 1;
+     unsigned int channels_code = channels - 1;
+     dst[5] = (bps_code << 6) | (bsf_code << 4) | channels_code;
+     dst[6] = dynamic_range_code;
+Index: mplex/stream_params.cpp
+===================================================================
+--- ./mplex/stream_params.cpp  (revision 3507)
++++ ./mplex/stream_params.cpp  (working copy)
+@@ -46,7 +46,7 @@
+                                                               unsigned int chans, 
+                                                               unsigned int bits )
+ {
+-    if( samples != 48000 && samples != 96000 )
++    if( samples != 48000 && samples != 96000  && samples != 44100 && samples != 32000 )
+         return 0;
+     if( chans < 1 || chans > 7 )
+         return 0;