mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
libeplayer/text_srt: minor optimization
This commit is contained in:
@@ -181,10 +181,7 @@ static void* SrtSubtitleThread(void *data) {
|
|||||||
Text = strdup(Data);
|
Text = strdup(Data);
|
||||||
} else {
|
} else {
|
||||||
int length = strlen(Text) /* \0 -> \n */ + strlen(Data) + 2 /* \0 */;
|
int length = strlen(Text) /* \0 -> \n */ + strlen(Data) + 2 /* \0 */;
|
||||||
char * tmpText = strdup(Text);
|
char * tmpText = Text;
|
||||||
|
|
||||||
free(Text);
|
|
||||||
|
|
||||||
Text = (char*)malloc(length);
|
Text = (char*)malloc(length);
|
||||||
|
|
||||||
strcpy(Text, tmpText);
|
strcpy(Text, tmpText);
|
||||||
|
Reference in New Issue
Block a user