Merge commit '7ee191cab0dc44700f26c5784e2adeb6a779651b'

* commit '7ee191cab0dc44700f26c5784e2adeb6a779651b':
  dv: Add a guard to not overread the ppcm array

See: 3669915e93
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-08 11:46:18 +02:00
commit 13e35a25f6

View File

@ -113,7 +113,7 @@ static const int dv_audio_frequency[3] = {
* 3. Audio is always returned as 16bit linear samples: 12bit nonlinear samples
* are converted into 16bit linear ones.
*/
static int dv_extract_audio(uint8_t *frame, uint8_t *ppcm[4],
static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm,
const DVprofile *sys)
{
int size, chan, i, j, d, of, smpls, freq, quant, half_ch;
@ -366,7 +366,7 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
uint8_t *buf, int buf_size, int64_t pos)
{
int size, i;
uint8_t *ppcm[4] = { 0 };
uint8_t *ppcm[5] = { 0 };
if (buf_size < DV_PROFILE_BYTES ||
!(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) ||