aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen D'Angelo <SDAngelo@evertz.com>2010-11-25 00:55:02 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-11-25 00:55:02 +0000
commitc538eb51c6e69e84abcca69601e74d14837f64e1 (patch)
tree02e117bf672dba2cf21207a0a85698868350a08e
parentb795ff97e5ae444ddf2277f66e29b30069170728 (diff)
downloadffmpeg-c538eb51c6e69e84abcca69601e74d14837f64e1.tar.gz
In TS demuxer, create the AVStream during pmt parsing if the pes stream does not
yet have it, this can happen if the pes stream contain data but no pes header has been encoutered yet. Patch by Stephen D'Angelo, SDAngelo at evertz dot com. Originally committed as revision 25823 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mpegts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 78c9d2f530..3c61d8ba67 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -974,6 +974,8 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
/* now create ffmpeg stream */
if (ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES) {
pes = ts->pids[pid]->u.pes_filter.opaque;
+ if (!pes->st)
+ pes->st = av_new_stream(pes->stream, pes->pid);
st = pes->st;
} else {
if (ts->pids[pid]) mpegts_close_filter(ts, ts->pids[pid]); //wrongly added sdt filter probably