Codebase list faad2 / 912b2ee
Unbreak PS audio (#51) This reverts commit 3b80a57483a6bc822d3ce3cc640fa81737a87c54. François Cartegnie authored 3 years ago GitHub committed 3 years ago
1 changed file(s) with 16 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
914914 /* element_output_channels not set yet */
915915 hDecoder->element_output_channels[hDecoder->fr_ch_ele] = output_channels;
916916 } else if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] != output_channels) {
917 /* element inconsistency
918 * this only happens if PS is actually found but not in the first frame
917 /* element inconsistency */
918
919 /* this only happens if PS is actually found but not in the first frame
919920 * this means that there is only 1 bitstream element!
920921 */
921922
922 if (hDecoder->fr_channels == 1) {
923 /* reset the allocation */
924 hDecoder->element_alloced[hDecoder->fr_ch_ele] = 0;
925 hDecoder->element_output_channels[hDecoder->fr_ch_ele] = output_channels;
926 } else {
927 return 21;
928 }
923 /* reset the allocation */
924 hDecoder->element_alloced[hDecoder->fr_ch_ele] = 0;
925
926 hDecoder->element_output_channels[hDecoder->fr_ch_ele] = output_channels;
927
928 //return 21;
929929 }
930930
931931 if (hDecoder->element_alloced[hDecoder->fr_ch_ele] == 0)
937937 hDecoder->element_alloced[hDecoder->fr_ch_ele] = 1;
938938 }
939939
940 /* sanity check, CVE-2018-20199, CVE-2018-20360 */
941 if(!hDecoder->time_out[sce->channel])
942 return 15;
940943
941944 /* dequantisation and scaling */
942945 retval = quant_to_spec(hDecoder, ics, spec_data, spec_coef, hDecoder->frameLength);
11161119
11171120 hDecoder->element_alloced[hDecoder->fr_ch_ele] = 2;
11181121 }
1122
1123 /* sanity check, CVE-2018-20199, CVE-2018-20360 */
1124 if(!hDecoder->time_out[cpe->channel])
1125 return 15;
11191126
11201127 /* dequantisation and scaling */
11211128 retval = quant_to_spec(hDecoder, ics1, spec_data1, spec_coef1, hDecoder->frameLength);