]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
h264 parser: fix unset frame duration check for h264 backlog
authorJaroslav Kysela <perex@perex.cz>
Thu, 3 Dec 2015 10:24:21 +0000 (11:24 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 3 Dec 2015 10:24:21 +0000 (11:24 +0100)
src/parsers/parser_h264.c
src/parsers/parsers.c

index cf4febc827bd4c0d945072a549d0a776b2f15e9d..e8bf6be5f994036cbf384fc0af115a0c03feea93 100644 (file)
@@ -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 */
   }
index 43cf9397b043d1426f6554eb8a019f3ceb78cf5f..951bdae317443821603b6e582e0d4c5730de2c5c 100644 (file)
@@ -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;