changeset 4999:476d3417effa libavformat

correctly handle maximum streams limit
author bcoudurier
date Tue, 02 Jun 2009 07:30:19 +0000
parents 5540ea103272
children e57ded024980
files mpegts.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegts.c	Tue Jun 02 07:26:58 2009 +0000
+++ b/mpegts.c	Tue Jun 02 07:30:19 2009 +0000
@@ -925,7 +925,8 @@
                     code = pes->header[3] | 0x100;
                     dprintf(pes->stream, "pid=%x pes_code=%#x\n", pes->pid, code);
 
-                    if ((pes->st && pes->st->discard == AVDISCARD_ALL) ||
+                    if ((!pes->st && pes->stream->nb_streams == MAX_STREAMS) ||
+                        (pes->st && pes->st->discard == AVDISCARD_ALL) ||
                         code == 0x1be) /* padding_stream */
                         goto skip;