summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-03-22 02:04:28 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-03-22 02:04:28 +0000
commit5f01c1258f98afce006488b65a5d7cf6cc9960f3 (patch)
tree68549d9b136f16d3998a6351e5a021a83e0cbf33 /libavformat
parentb38d7298bdc31e000c3d533d99c0cae1ef57d1c2 (diff)
downloadffmpeg-streaming-5f01c1258f98afce006488b65a5d7cf6cc9960f3.zip
ffmpeg-streaming-5f01c1258f98afce006488b65a5d7cf6cc9960f3.tar.gz
avoid creating a new stream not referenced in pmt since it cannot be associated to a program, fix issue 835
Originally committed as revision 18137 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpegts.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 33e618c..87c020a 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -857,14 +857,11 @@ static void mpegts_push_data(MpegTSFilter *filter,
pes->header[2] == 0x01) {
/* it must be an mpeg2 PES stream */
code = pes->header[3] | 0x100;
- if (!((code >= 0x1c0 && code <= 0x1df) ||
+ if (!pes->st ||
+ !((code >= 0x1c0 && code <= 0x1df) ||
(code >= 0x1e0 && code <= 0x1ef) ||
(code == 0x1bd) || (code == 0x1fd)))
goto skip;
- if (!pes->st) {
- /* allocate stream */
- new_pes_av_stream(pes, code);
- }
pes->state = MPEGTS_PESHEADER_FILL;
pes->total_size = AV_RB16(pes->header + 4);
/* NOTE: a zero total size means the PES size is
OpenPOWER on IntegriCloud