mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
libspark/playback: add more player checks
Origin commit data
------------------
Branch: master
Commit: a4f3af23bf
Author: martii <m4rtii@gmx.de>
Date: 2013-11-03 (Sun, 03 Nov 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -213,7 +213,7 @@ bool cPlayback::Start(char *filename, int vpid, int vtype, int apid, int ac3, un
|
|||||||
{
|
{
|
||||||
//pause playback in case of timeshift
|
//pause playback in case of timeshift
|
||||||
//FIXME: no picture on tv
|
//FIXME: no picture on tv
|
||||||
if (player->playback->Command(player, PLAYBACK_PAUSE, NULL) < 0)
|
if (!player || !player->playback || player->playback->Command(player, PLAYBACK_PAUSE, NULL) < 0)
|
||||||
{
|
{
|
||||||
ret = false;
|
ret = false;
|
||||||
printf("failed to pause playback\n");
|
printf("failed to pause playback\n");
|
||||||
@@ -268,8 +268,7 @@ bool cPlayback::Stop(void)
|
|||||||
player->playback->Command(player,PLAYBACK_CLOSE, NULL);
|
player->playback->Command(player,PLAYBACK_CLOSE, NULL);
|
||||||
if(player)
|
if(player)
|
||||||
free(player);
|
free(player);
|
||||||
if(player != NULL)
|
player = NULL;
|
||||||
player = NULL;
|
|
||||||
|
|
||||||
playing=false;
|
playing=false;
|
||||||
return true;
|
return true;
|
||||||
@@ -412,7 +411,8 @@ bool cPlayback::GetSpeed(int &speed) const
|
|||||||
|
|
||||||
void cPlayback::GetPts(uint64_t &pts)
|
void cPlayback::GetPts(uint64_t &pts)
|
||||||
{
|
{
|
||||||
player->playback->Command(player, PLAYBACK_PTS, (void*)&pts);
|
if (player && player->playback)
|
||||||
|
player->playback->Command(player, PLAYBACK_PTS, (void*)&pts);
|
||||||
}
|
}
|
||||||
|
|
||||||
// in milliseconds
|
// in milliseconds
|
||||||
|
Reference in New Issue
Block a user