[FFmpeg-cvslog] r21129 - trunk/libavformat/matroskadec.c
conrad
subversion
Mon Jan 11 01:31:56 CET 2010
Author: conrad
Date: Mon Jan 11 01:31:55 2010
New Revision: 21129
Log:
mkvdec: Avoid divide-by-zero crash on invalid real audio tracks
Modified:
trunk/libavformat/matroskadec.c
Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c Mon Jan 11 01:31:52 2010 (r21128)
+++ trunk/libavformat/matroskadec.c Mon Jan 11 01:31:55 2010 (r21129)
@@ -1634,9 +1634,10 @@ static int matroska_parse_block(Matroska
if (res == 0) {
for (n = 0; n < laces; n++) {
- if (st->codec->codec_id == CODEC_ID_RA_288 ||
- st->codec->codec_id == CODEC_ID_COOK ||
- st->codec->codec_id == CODEC_ID_ATRAC3) {
+ if ((st->codec->codec_id == CODEC_ID_RA_288 ||
+ st->codec->codec_id == CODEC_ID_COOK ||
+ st->codec->codec_id == CODEC_ID_ATRAC3) &&
+ st->codec->block_align && track->audio.sub_packet_size) {
int a = st->codec->block_align;
int sps = track->audio.sub_packet_size;
int cfs = track->audio.coded_framesize;
More information about the ffmpeg-cvslog
mailing list