From: Jaroslav Kysela Date: Thu, 3 Dec 2015 10:24:21 +0000 (+0100) Subject: h264 parser: fix unset frame duration check for h264 backlog X-Git-Tag: v4.2.1~1390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70382058704ce59c5ceebea1394d10212268cd28;p=thirdparty%2Ftvheadend.git h264 parser: fix unset frame duration check for h264 backlog --- diff --git a/src/parsers/parser_h264.c b/src/parsers/parser_h264.c index cf4febc82..e8bf6be5f 100644 --- a/src/parsers/parser_h264.c +++ b/src/parsers/parser_h264.c @@ -427,7 +427,7 @@ h264_decode_slice_header(elementary_stream_t *st, bitstream_t *bs, int *pkttype, d = 0; if (sps->time_scale) d = 180000 * (uint64_t)sps->units_in_tick / (uint64_t)sps->time_scale; - if (d == 0 && st->es_frame_duration == 0 && p->start + 4 < dispatch_clock) { + if (d == 0 && st->es_frame_duration < 2 && p->start + 4 < dispatch_clock) { tvhwarn("parser", "H264 stream has not timing information, using 30fps"); d = 3000; /* 90000/30 = 3000 : 30fps */ } diff --git a/src/parsers/parsers.c b/src/parsers/parsers.c index 43cf9397b..951bdae31 100644 --- a/src/parsers/parsers.c +++ b/src/parsers/parsers.c @@ -997,7 +997,7 @@ parser_set_stream_vparam(elementary_stream_t *st, int width, int height, { int need_save = 0; - if(st->es_width == 0 && st->es_height == 0 && st->es_frame_duration == 0) { + if(st->es_width == 0 && st->es_height == 0 && st->es_frame_duration < 2) { need_save = 1; st->es_meta_change = 0;