From c240357f903f20ba51001fb90aa2de415d5be825 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Mon, 28 Jun 2010 21:26:54 +0000
Subject: [PATCH 16/24] Speed up mpegts av_find_stream_info

---
 libavformat/mpegts.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index c374cb9..6da6db5 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -825,7 +825,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
                         goto skip;
 
                     /* stream not present in PMT */
-                    if (!pes->st) {
+                    if (ts->auto_guess && !pes->st) {
                         pes->st = avformat_new_stream(ts->stream, NULL);
                         if (!pes->st)
                             return AVERROR(ENOMEM);
-- 
1.7.9.4

