[FFmpeg-cvslog] mpegts: make sure the "standard" code doesnt override the probing with NONE /DATA.

Michael Niedermayer git at videolan.org
Thu Sep 15 23:09:35 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Sep 15 23:01:04 2011 +0200| [e78d1a594a0a4942b2c39170df10b9f36f9b8d08] | committer: Michael Niedermayer

mpegts: make sure the "standard" code doesnt override the probing with NONE/DATA.
Fixes video stream detection in vid_0x80.ts

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e78d1a594a0a4942b2c39170df10b9f36f9b8d08
---

 libavformat/mpegts.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index b9efe82..d3f40aa 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -590,6 +590,8 @@ static void mpegts_find_stream_type(AVStream *st,
 static int mpegts_set_stream_info(AVStream *st, PESContext *pes,
                                   uint32_t stream_type, uint32_t prog_reg_desc)
 {
+    int old_codec_type= st->codec->codec_type;
+    int old_codec_id  = st->codec->codec_id;
     av_set_pts_info(st, 33, 1, 90000);
     st->priv_data = pes;
     st->codec->codec_type = AVMEDIA_TYPE_DATA;
@@ -634,6 +636,10 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes,
     }
     if (st->codec->codec_id == CODEC_ID_NONE)
         mpegts_find_stream_type(st, pes->stream_type, MISC_types);
+    if (st->codec->codec_id == CODEC_ID_NONE){
+        st->codec->codec_id  = old_codec_id;
+        st->codec->codec_type= old_codec_type;
+    }
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list