610f94e65111a30607a6048b44e4dfb68e0188af
[goodguy/cinelerra.git] / cinelerra-5.1 / thirdparty / src / mjpegtools-2.1.0.patch8
1 Index: mplex/lpcmstrm_in.cpp
2 ===================================================================
3 --- ./mplex/lpcmstrm_in.cpp     (revision 3507)
4 +++ ./mplex/lpcmstrm_in.cpp     (working copy)
5 @@ -306,7 +306,15 @@
6      default : bps_code = 3; break;
7      }
8      dst[4] = starting_frame_index;
9 -    unsigned int bsf_code = (samples_per_second == 48000) ? 0 : 1;
10 +    unsigned int bsf_code;
11 +    switch(samples_per_second)
12 +    {
13 +    case 48000: bsf_code = 0; break;
14 +    case 96000: bsf_code = 1; break;
15 +    case 44100: bsf_code = 2; break;
16 +    case 32000: bsf_code = 3; break;
17 +    }
18 +    //unsigned int bsf_code = (samples_per_second == 48000) ? 0 : 1;
19      unsigned int channels_code = channels - 1;
20      dst[5] = (bps_code << 6) | (bsf_code << 4) | channels_code;
21      dst[6] = dynamic_range_code;
22 Index: mplex/stream_params.cpp
23 ===================================================================
24 --- ./mplex/stream_params.cpp   (revision 3507)
25 +++ ./mplex/stream_params.cpp   (working copy)
26 @@ -46,7 +46,7 @@
27                                                                 unsigned int chans, 
28                                                                 unsigned int bits )
29  {
30 -    if( samples != 48000 && samples != 96000 )
31 +    if( samples != 48000 && samples != 96000  && samples != 44100 && samples != 32000 )
32          return 0;
33      if( chans < 1 || chans > 7 )
34          return 0;