summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-01-05 02:01:31 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-01-05 02:01:31 +0100
commit4c7302685f04c453116112e3e0874d8b98420589 (patch)
treeca5b87f78c186c8e902fc2b31be62a6b168bc634 /src/input
parentab7525dbd45742cd9b583c1fb1cc4ff2443414e5 (diff)
downloadxine-lib-4c7302685f04c453116112e3e0874d8b98420589.tar.gz
xine-lib-4c7302685f04c453116112e3e0874d8b98420589.tar.bz2
Update to the new crc API from FFmpeg.
Note that I had to add a class pointer to demux_ts otherwise I would have to initialise it in the plugin structures (wasting space).
Diffstat (limited to 'src/input')
-rw-r--r--src/input/input_dvb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index 9f53d6b90..51e4d47aa 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -298,6 +298,8 @@ typedef struct {
int numchannels;
char *autoplaylist[MAX_AUTOCHANNELS];
+
+ const AVCRC *av_crc;
} dvb_input_class_t;
typedef struct {
@@ -2453,9 +2455,6 @@ static void ts_rewrite_packets (dvb_input_plugin_t *this, unsigned char * origin
originalPkt+=data_offset;
if (pid == 0 && sync_byte==0x47) {
- if ( ! *av_crc04C11DB7 )
- av_crc_init(av_crc04C11DB7, 0, 32, AV_CRC_32_IEEE, sizeof(AVCRC)*257);
-
unsigned long crc;
originalPkt[3]=13; /* section length including CRC - first 3 bytes */
@@ -2467,7 +2466,7 @@ static void ts_rewrite_packets (dvb_input_plugin_t *this, unsigned char * origin
originalPkt[11]=(this->channels[this->channel].pmtpid >> 8) & 0xff;
originalPkt[12]=this->channels[this->channel].pmtpid & 0xff;
- crc = av_crc(av_crc04C11DB7, 0xffffffff, originalPkt+1, 12);
+ crc = av_crc(this->class->av_crc, 0xffffffff, originalPkt+1, 12);
originalPkt[13]=(crc>>24) & 0xff;
originalPkt[14]=(crc>>16) & 0xff;
@@ -3268,6 +3267,8 @@ static void *init_class (xine_t *xine, void *data) {
this->mrls[4] = "dvba://";
this->mrls[5] = 0;
+ this->av_crc = av_crc_get_table(AV_CRC_32_IEEE);
+
xprintf(this->xine,XINE_VERBOSITY_DEBUG,"init class succeeded\n");
/* Enable remembering of last watched channel */