Justin Ruggles <justin.rugg...@gmail.com> added the comment: On 01/17/2011 03:19 PM, ami_stuff wrote:
> > New submission from ami_stuff <ami_st...@o2.pl>: > > the latest voc modification broken decoding of > > http://samples.mplayerhq.hu/voc/pcm_s16_2/nem.voc > > > > Author: cehoyos > Date: Tue Jan 11 15:08:45 2011 > New Revision: 26309 > > Log: > Do not crash for illegal sample size, fixes issue 2502. > > Patch by Daniel Kang, daniel.d.kang at gmail > > @@ -113,7 +117,11 @@ voc_get_packet(AVFormatContext *s, AVPac > dec->sample_rate = get_le32(pb); > dec->bits_per_coded_sample = get_byte(pb); > dec->channels = get_byte(pb); > - dec->codec_id = ff_codec_get_id(ff_voc_codec_tags, get_le16(pb)); > + tmp_codec = ff_codec_get_id(ff_voc_codec_tags, get_byte(pb)); > + if (dec->codec_id == CODEC_ID_NONE) > + dec->codec_id = tmp_codec; > + else if (dec->codec_id != tmp_codec) > + av_log(s, AV_LOG_WARNING, "Ignoring mid-stream change in > audio > codec\n"); There is the problem. get_le16() was changed to get_byte(). I'll send a patch to ffmpeg-devel shortly. ________________________________________________ FFmpeg issue tracker <iss...@roundup.ffmpeg.org> <https://roundup.ffmpeg.org/issue2560> ________________________________________________