changed: Add logic to properly handle subtitles for stacked files
[vuplus_xbmc] / lib / ffmpeg / patches / 0016-Speed-up-mpegts-av_find_stream_info.patch
1 From c240357f903f20ba51001fb90aa2de415d5be825 Mon Sep 17 00:00:00 2001
2 From: Joakim Plate <elupus@ecce.se>
3 Date: Mon, 28 Jun 2010 21:26:54 +0000
4 Subject: [PATCH 16/24] Speed up mpegts av_find_stream_info
5
6 ---
7  libavformat/mpegts.c |    7 +++++--
8  1 file changed, 5 insertions(+), 2 deletions(-)
9
10 diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
11 index c374cb9..6da6db5 100644
12 --- a/libavformat/mpegts.c
13 +++ b/libavformat/mpegts.c
14 @@ -825,7 +825,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
15                          goto skip;
16  
17                      /* stream not present in PMT */
18 -                    if (!pes->st) {
19 +                    if (ts->auto_guess && !pes->st) {
20                          pes->st = avformat_new_stream(ts->stream, NULL);
21                          if (!pes->st)
22                              return AVERROR(ENOMEM);
23 @@ -2013,7 +2013,10 @@ static int mpegts_read_header(AVFormatContext *s,
24  
25          av_dlog(ts->stream, "tuning done\n");
26  
27 -        s->ctx_flags |= AVFMTCTX_NOHEADER;
28 +        /* only flag NOHEADER if we are in file mode,
29 +           in streaming mode scanning may take too long for users */
30 +        if (pb->seekable)
31 +            s->ctx_flags |= AVFMTCTX_NOHEADER;
32      } else {
33          AVStream *st;
34          int pcr_pid, pid, nb_packets, nb_pcrs, ret, pcr_l;
35 -- 
36 1.7.9.4
37