Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
h264 parser: fix unset frame duration check for h264 backlog
  • Loading branch information
perexg committed Dec 3, 2015
1 parent 9abb1f2 commit 7038205
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/parsers/parser_h264.c
Expand Up @@ -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 */
}
Expand Down
2 changes: 1 addition & 1 deletion src/parsers/parsers.c
Expand Up @@ -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;

Expand Down

0 comments on commit 7038205

Please sign in to comment.