eepgcache and title searching
Re: eepgcache and title searching #81
Re: eepgcache and title searching #82
Re: eepgcache and title searching #83
Re: eepgcache and title searching #84
Re: eepgcache and title searching #85
Posted 22 January 2012 - 21:45
Here is the fix or potential fix if you willGreat, we're waiting patch for testing.
@ims - you were right it had to do with the length but not in the way I had originally thought
Changes
------------------
Fix for short event description data not showing up
After converting our titles to UTF8 we have the problem that they no
longer fit into a short event descriptor structure because the length
is only 8 bits. Split the title and text of short event descriptor to
better deal with this. Also add a hack to hardcode a data length when
our data is too long.
Splitting the title and text makes us waste some memory, however
since we split title and text we end up saving anywhere in the range
of 10 to 30 % on title storage. This is because previously we checked
to see if the entire descriptor was a duplicate, which didnt match duplicate
titles when it could have.
Also fix a memory leak in the process.
TODO: fix all text storage not to use the dvb descriptor format, possibly use
a title and text index as this is sort of what we are doing now with the descriptor
map.
------------------
Use only one constructor for eventData
We can use one eventData constructor as they both do more or less the same thing.
Attached Files
Re: eepgcache and title searching #86
Re: eepgcache and title searching #87
Posted 22 January 2012 - 21:56
Yes, it should be, I hadn't pull the last 4 commits, but these files were not affect in those, so it should merge right in.it is patch for OpenPLi git ?
Although I had merged my changes on to master from a branch I had, which I may have messed up, but diff shows that the areas affect are the same, so should be fine.
Re: eepgcache and title searching #88
Re: eepgcache and title searching #89
Re: eepgcache and title searching #90
Re: eepgcache and title searching #91
Re: eepgcache and title searching #92
Re: eepgcache and title searching #93
Posted 23 January 2012 - 08:07
Will likely need to make a special patch for you to get some more information.Thx, but after patch without ANY changes:)
36e 9e
Maybe you see this sats or maybe some information from me can help?
In the meantime there are two added in the patch with 255 - 6, could you change these to 255 - 7
Little explanation behind this, 255 - 6 is a check to make sure that when we add our title length together with the overhead of the rest of the descriptor the descriptor length still fits into the byte used to store the length. Now I thought that 255 -6 would end up storing 0xFF in the field when our data was too long.
So if you could try 255 - 7, and let me know that would be great. Otherwise I will try and provide you with a patch for more debug later in the day.
Re: eepgcache and title searching #94
Posted 23 January 2012 - 08:12
http://openpli.git.s...igma2;a=summary
Re: eepgcache and title searching #95
Re: eepgcache and title searching #96
Re: eepgcache and title searching #97
Re: eepgcache and title searching #98
Posted 23 January 2012 - 10:44
Has it been investigated what happens if an incomplete utf8 sequence it present, because of the truncate hack?
We have to know how the various utf8 parsers (c++, python) handle such situations.
Or rather, we should never store incomplete utf8 sequences.
By using a truncate function such as this (untested):
if (data[length - 1] > 0x7F) { do { /* remove all UTF data bytes, not including the start byte, which is {0xC0 <= startbyte <= 0xFD} */ length--; } while (length > 0 && data[length - 1] <= 0xBF); /* remove only databytes */ } /* remove the UTF startbyte, or normal ascii character */ if (length > 0) { length--; } data[length] = 0;
Re: eepgcache and title searching #99
Re: eepgcache and title searching #100
Posted 23 January 2012 - 11:34
If you dont take this fix, then you should at least for the time being take the memleak patch I have posted.I'd rather not commit something before it's final
Has it been investigated what happens if an incomplete utf8 sequence it present, because of the truncate hack?
We have to know how the various utf8 parsers (c++, python) handle such situations.
Or rather, we should never store incomplete utf8 sequences.
By using a truncate function such as this (untested):if (data[length - 1] > 0x7F) { do { /* remove all UTF data bytes, not including the start byte, which is {0xC0 <= startbyte <= 0xFD} */ length--; } while (length > 0 && data[length - 1] <= 0xBF); /* remove only databytes */ } /* remove the UTF startbyte, or normal ascii character */ if (length > 0) { length--; } data[length] = 0;
A full solution to this fix is only possible with a large rewrite of eventData, or some other more hacked methods, as such this is not a quick fix and the changes should be reverted.
8 user(s) are reading this topic
0 members, 8 guests, 0 anonymous users