fix RF64 on armel/armhf archs

Origin: upstream
Applied-Upstream: 9d470ee5577d3ccedb1c28c7e0a7295ba17feaf5
Last-Update: 2017-06-20

Gbp-Pq: Name fix_rf64_arm.patch
This commit is contained in:
Erik de Castro Lopez 2017-06-20 00:00:00 +02:00 committed by openKylinBot
parent e4a7ad988c
commit 31acbcb889
1 changed files with 9 additions and 2 deletions

View File

@ -339,6 +339,12 @@ rf64_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
} ;
break ;
case JUNK_MARKER :
case PAD_MARKER :
psf_log_printf (psf, "%M : %d\n", marker, chunk_size) ;
psf_binheader_readf (psf, "j", chunk_size) ;
break ;
default :
if (chunk_size >= 0xffff0000)
{ psf_log_printf (psf, "*** Unknown chunk marker (%X) at position %D with length %u. Exiting parser.\n", marker, psf_ftell (psf) - 8, chunk_size) ;
@ -659,7 +665,7 @@ rf64_write_header (SF_PRIVATE *psf, int calc_length)
if (wpriv->rf64_downgrade && psf->filelength < RIFF_DOWNGRADE_BYTES)
{ psf_binheader_writef (psf, "etm8m", RIFF_MARKER, (psf->filelength < 8) ? 8 : psf->filelength - 8, WAVE_MARKER) ;
psf_binheader_writef (psf, "m4884", JUNK_MARKER, 20, 0, 0, 0, 0) ;
psf_binheader_writef (psf, "m4z", JUNK_MARKER, 24, 24) ;
add_fact_chunk = 1 ;
}
else
@ -735,9 +741,10 @@ rf64_write_header (SF_PRIVATE *psf, int calc_length)
#endif
/* Padding may be needed if string data sizes change. */
pad_size = psf->dataoffset - 16 - psf->header.indx ;
if (pad_size >= 0)
psf_binheader_writef (psf, "m4z", PAD_MARKER, pad_size, make_size_t (pad_size)) ;
psf_binheader_writef (psf, "m4z", PAD_MARKER, (unsigned int) pad_size, make_size_t (pad_size)) ;
if (wpriv->rf64_downgrade && (psf->filelength < RIFF_DOWNGRADE_BYTES))
psf_binheader_writef (psf, "tm8", data_MARKER, psf->datalength) ;