diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-04-24 17:33:48 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-05-07 17:38:18 +0200 |
commit | 90f5e991be3a28a2caa06132d995c0daef911a56 (patch) | |
tree | 7d38118dc00aefe3acc970a82b1f9f18154d040e /libavformat/mpegts.c | |
parent | 5901cd6236d97b34fe59a47ba0fd6da8f647d1f1 (diff) | |
download | ffmpeg-90f5e991be3a28a2caa06132d995c0daef911a56.tar.gz |
Assume some TS packet size instead of failing completely.
Fixes ticket #68.
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r-- | libavformat/mpegts.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 665c92a08d..caef69d1eb 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1468,8 +1468,10 @@ static int mpegts_read_header(AVFormatContext *s, if (len != sizeof(buf)) goto fail; ts->raw_packet_size = get_packet_size(buf, sizeof(buf)); - if (ts->raw_packet_size <= 0) - goto fail; + if (ts->raw_packet_size <= 0) { + av_log(s, AV_LOG_WARNING, "Could not detect TS packet size, defaulting to non-FEC/DVHS\n"); + ts->raw_packet_size = TS_PACKET_SIZE; + } ts->stream = s; ts->auto_guess = 0; |