Assume some TS packet size instead of failing completely.

Fixes ticket #68.
This commit is contained in:
Reimar Döffinger 2011-04-24 17:33:48 +02:00
parent 5901cd6236
commit 90f5e991be
1 changed files with 4 additions and 2 deletions

View File

@ -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;