mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
libeplayer3-arm:playback.c: avoid use after free
Origin commit data
------------------
Branch: master
Commit: 246230840b
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-01 (Wed, 01 Jan 2020)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -219,8 +219,11 @@ static int PlaybackOpen(Context_t *context, PlayFiles_t *pFiles)
|
|||||||
(context->container->selectedContainer->Command(context, CONTAINER_INIT, pFiles) < 0))
|
(context->container->selectedContainer->Command(context, CONTAINER_INIT, pFiles) < 0))
|
||||||
{
|
{
|
||||||
playback_err("CONTAINER_ADD failed\n");
|
playback_err("CONTAINER_ADD failed\n");
|
||||||
|
if(context->playback->uri)
|
||||||
|
{
|
||||||
free(context->playback->uri);
|
free(context->playback->uri);
|
||||||
context->playback->uri = NULL;
|
context->playback->uri = NULL;
|
||||||
|
}
|
||||||
return cERR_PLAYBACK_ERROR;
|
return cERR_PLAYBACK_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -473,13 +476,16 @@ static int32_t PlaybackTerminate(Context_t *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = context->container->selectedContainer->Command(context, CONTAINER_STOP, NULL);
|
ret = context->container->selectedContainer->Command(context, CONTAINER_STOP, NULL);
|
||||||
|
if(context && context->playback)
|
||||||
|
{
|
||||||
context->playback->isPaused = 0;
|
context->playback->isPaused = 0;
|
||||||
context->playback->isPlaying = 0;
|
context->playback->isPlaying = 0;
|
||||||
context->playback->isForwarding = 0;
|
context->playback->isForwarding = 0;
|
||||||
context->playback->BackWard = 0;
|
context->playback->BackWard = 0;
|
||||||
context->playback->SlowMotion = 0;
|
context->playback->SlowMotion = 0;
|
||||||
context->playback->Speed = 0;
|
context->playback->Speed = 0;
|
||||||
|
}
|
||||||
|
if(context && context->output)
|
||||||
context->output->Command(context, OUTPUT_STOP, NULL);
|
context->output->Command(context, OUTPUT_STOP, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user