Clear p26 extended data, possible fix for Norwegian ttx subtitles. patch from Henrik Nilsson

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1847 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2011-11-15 08:48:58 +00:00
parent 8b8b89a129
commit 54255df7df
3 changed files with 17 additions and 0 deletions

View File

@@ -1444,6 +1444,7 @@ void eval_l25()
#endif
APx0 = APy0 = APx = APy = tAPx = tAPy = 0;
eval_object(13 * (23-2 + 2), tuxtxt_cache.astCachetable[tuxtxt_cache.page][tuxtxt_cache.subpage], &APx, &APy, &APx0, &APy0, OBJ_ACTIVE, &page_char[40]); /* 1st triplet p26/0 */
tuxtxt_clear_p26(pi->ext);
}
{

View File

@@ -61,6 +61,7 @@ extern void tuxtxt_decode_btt();
extern void tuxtxt_decode_adip(); /* additional information table */
extern void tuxtxt_compress_page(int p, int sp, unsigned char* buffer);
extern void tuxtxt_decompress_page(int p, int sp, unsigned char* buffer);
extern void tuxtxt_clear_p26(tstExtData* extData);
#if TUXTXT_DEBUG
extern int tuxtxt_get_zipsize(int p, int sp);
#endif

View File

@@ -520,6 +520,21 @@ void tuxtxt_erase_page(int magazine)
}
}
void tuxtxt_clear_p26(tstExtData* extData)
{
pthread_mutex_lock(&tuxtxt_cache_lock);
for(int i = 0; i < 16; ++i)
{
if(0 != extData->p26[i])
{
memset(extData->p26[i], 0x00, 13 * 3);
}
}
pthread_mutex_unlock(&tuxtxt_cache_lock);
}
void tuxtxt_allocate_cache(int magazine)
{
// Lock here as we have a possible race here with