Skip to content

Commit d01e4dc

Browse files
committed
crash fix
1 parent 0e24c03 commit d01e4dc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mpeg2dec.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,11 @@ void sound_to_frames(VideoState *is, short **b, int s, int c, int format)
569569
for (l=0;l < c;l++ )
570570
{
571571
fb[l] = (float*)b[l];
572+
// handle tracks where more channels advertised than data available
573+
if (fb[l] == NULL) {
574+
c = l-1;
575+
break;
576+
}
572577
}
573578
for (i = 0; i < s; i++)
574579
{

0 commit comments

Comments
 (0)