Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[pvr.tvh] ignore subscriptionStart if video stream details are missing
This fixes a bug where VAAPI sometimes crashes because we try to
initialize it with 0x0 video dimensions
  • Loading branch information
Jalle19 committed Aug 11, 2014
1 parent 8dec849 commit c0118a7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions addons/pvr.tvh/src/HTSPDemuxer.cpp
Expand Up @@ -515,6 +515,15 @@ void CHTSPDemuxer::ParseSubscriptionStart ( htsmsg_t *m )
stream.iWidth = htsmsg_get_u32_or_default(&f->hmf_msg, "width", 0);
stream.iHeight = htsmsg_get_u32_or_default(&f->hmf_msg, "height", 0);

/* Ignore this message if the stream details haven't been determined
yet, a new message will be sent once they have. This is fixed in
some versions of tvheadend and is here for backward compatibility. */
if (stream.iWidth == 0 || stream.iHeight == 0)
{
tvhinfo("Ignoring subscriptionStart, stream details missing");
return;
}

/* Setting aspect ratio to zero will cause XBMC to handle changes in it */
stream.fAspect = 0.0f;

Expand Down

1 comment on commit c0118a7

@fritsch
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much.

Please sign in to comment.