Browse code

avformat/mpegts: recognizes and export private streams

Based on patch by Wolfgang Lorenz <wl-chmw@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2015/06/05 06:46:21
Showing 1 changed files
... ...
@@ -835,6 +835,14 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes,
835 835
         st->codec->codec_id  = old_codec_id;
836 836
         st->codec->codec_type = old_codec_type;
837 837
     }
838
+    if ((st->codec->codec_id == AV_CODEC_ID_NONE ||
839
+            (st->request_probe > 0 && st->request_probe < AVPROBE_SCORE_STREAM_RETRY / 5)) &&
840
+        !avcodec_is_open(st->codec) &&
841
+        stream_type ==  6) {
842
+        st->codec->codec_type = AVMEDIA_TYPE_DATA;
843
+        st->codec->codec_id   = AV_CODEC_ID_BIN_DATA;
844
+        st->request_probe = AVPROBE_SCORE_STREAM_RETRY / 5;
845
+    }
838 846
 
839 847
     return 0;
840 848
 }