From bf57d03c0f133f9ade5909f147ea7b32ddf2e135 Mon Sep 17 00:00:00 2001
From: Karl Dietz <dekarl@users.sourceforge.net>
Date: Mon, 26 Mar 2012 19:13:21 +0200
Subject: [PATCH 6/6] crc32 of nothing is 0, not -1 (just a guess based on observation and discussions)
---
mythtv/libs/libmythtv/mpeg/pespacket.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/mythtv/libs/libmythtv/mpeg/pespacket.cpp b/mythtv/libs/libmythtv/mpeg/pespacket.cpp
index 4df52da..e2f1cd7 100644
a
|
b
|
void PESPacket::GetAsTSPackets(vector<TSPacket> &output, uint cc) const |
142 | 142 | #undef INCR_CC |
143 | 143 | } |
144 | 144 | |
| 145 | // The CRC should be 0 if everything is ok |
| 146 | // From http://forums.dvbowners.com/index.php?showtopic=10773&view=findpost&p=74377 |
| 147 | // the official specs leave it for you to figure out |
145 | 148 | uint PESPacket::CalcCRC(void) const |
146 | 149 | { |
147 | 150 | if (Length() < 1) |
148 | | return 0xffffffff; |
| 151 | return 0; |
149 | 152 | return av_bswap32(av_crc(av_crc_get_table(AV_CRC_32_IEEE), (uint32_t) -1, |
150 | 153 | _pesdata, Length() - 1)); |
151 | 154 | } |