Based on patch by Wolfgang Lorenz <wl-chmw@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -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 |
} |