[FFmpeg-cvslog] r25823 - trunk/libavformat/mpegts.c

bcoudurier subversion
Thu Nov 25 01:55:02 CET 2010


Author: bcoudurier
Date: Thu Nov 25 01:55:02 2010
New Revision: 25823

Log:
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.

Modified:
   trunk/libavformat/mpegts.c

Modified: trunk/libavformat/mpegts.c
==============================================================================
--- trunk/libavformat/mpegts.c	Thu Nov 25 01:29:44 2010	(r25822)
+++ trunk/libavformat/mpegts.c	Thu Nov 25 01:55:02 2010	(r25823)
@@ -974,6 +974,8 @@ static void pmt_cb(MpegTSFilter *filter,
         /* 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



More information about the ffmpeg-cvslog mailing list