summaryrefslogtreecommitdiff
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-03-04 01:12:17 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-04-03 16:40:11 +0200
commit5b56ad03fa3c580e38322c902891a77ecc93686b (patch)
treee0ad41a78ddd4ffe29bff1558c4e761bce07fa9d /libavformat/mpeg.c
parent15957b197a63d08c33c34f08ef8b161335736914 (diff)
Reimplement stream probe try #2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 3903949d5d..e4f774db3c 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -421,6 +421,7 @@ static int mpegps_read_packet(AVFormatContext *s,
MpegDemuxContext *m = s->priv_data;
AVStream *st;
int len, startcode, i, es_type;
+ int request_probe= 0;
enum CodecID codec_id = CODEC_ID_NONE;
enum AVMediaType type;
int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work
@@ -479,7 +480,7 @@ static int mpegps_read_packet(AVFormatContext *s,
if(!memcmp(buf, avs_seqh, 4) && (buf[6] != 0 || buf[7] != 1))
codec_id = CODEC_ID_CAVS;
else
- codec_id = CODEC_ID_PROBE;
+ request_probe= 1;
type = AVMEDIA_TYPE_VIDEO;
} else if (startcode >= 0x1c0 && startcode <= 0x1df) {
type = AVMEDIA_TYPE_AUDIO;
@@ -534,6 +535,7 @@ static int mpegps_read_packet(AVFormatContext *s,
goto skip;
st->codec->codec_type = type;
st->codec->codec_id = codec_id;
+ st->request_probe = request_probe;
if (codec_id != CODEC_ID_PCM_S16BE)
st->need_parsing = AVSTREAM_PARSE_FULL;
found: