Skip to content

Commit

Permalink
Account for the possibility of a dts with no pts.
Browse files Browse the repository at this point in the history
This would probably never happen in practice, but better safe than sorry.
  • Loading branch information
daniel-kristjansson committed Dec 12, 2011
1 parent ec6be27 commit e2ab48c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mpeg/pespacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class PESPacket
/// Decode Time Stamp, present if HasDTS() is true
uint64_t DTS(void) const
{
int i = 6+5;
int i = 6+(HasPTS()?5:0);
return
(uint64_t(_pesdata[i+0] & 0x0e) << 29) |
(uint64_t(_pesdata[i+1] ) << 22) |
Expand Down

0 comments on commit e2ab48c

Please sign in to comment.