Merge branch 'master' of github.com:Duckbox-Developers/libstb-hal-ddt

Origin commit data
------------------
Branch: master
Commit: fe7ad35c35
Author: TangoCash <eric@loxat.de>
Date: 2018-08-10 (Fri, 10 Aug 2018)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2018-08-10 19:38:11 +02:00
3 changed files with 12 additions and 7 deletions

View File

@@ -494,13 +494,13 @@ static inline int rate2csapi(int rate)
return 1; return 1;
case 25: case 25:
return 2; return 2;
case 29976: case 29970:
return 3; return 3;
case 30: case 30:
return 4; return 4;
case 50: case 50:
return 5; return 5;
case 50940: case 59940:
return 6; return 6;
case 60: case 60:
return 7; return 7;

View File

@@ -300,7 +300,8 @@ static int PlaybackPlay(Context_t *context)
context->playback->BackWard = 0; context->playback->BackWard = 0;
context->playback->SlowMotion = 0; context->playback->SlowMotion = 0;
context->playback->Speed = 0; context->playback->Speed = 0;
context->container->selectedContainer->Command(context, CONTAINER_STOP, NULL); if (context->container && context->container->selectedContainer)
ret = context->container->selectedContainer->Command(context, CONTAINER_STOP, NULL);
} }
else else
{ {
@@ -331,7 +332,8 @@ static int PlaybackPlay(Context_t *context)
context->playback->isCreationPhase = 0; // allow thread to go into next state context->playback->isCreationPhase = 0; // allow thread to go into next state
ret = context->container->selectedContainer->Command(context, CONTAINER_PLAY, NULL); if (context->container && context->container->selectedContainer)
ret = context->container->selectedContainer->Command(context, CONTAINER_PLAY, NULL);
if (ret != 0) if (ret != 0)
{ {
playback_err("CONTAINER_PLAY failed!\n"); playback_err("CONTAINER_PLAY failed!\n");

View File

@@ -794,13 +794,13 @@ static inline int rate2csapi(int rate)
return 1; return 1;
case 25000: case 25000:
return 2; return 2;
case 29976: case 29970:
return 3; return 3;
case 30000: case 30000:
return 4; return 4;
case 50000: case 50000:
return 5; return 5;
case 50940: case 59940:
return 6; return 6;
case 60000: case 60000:
return 7; return 7;
@@ -817,7 +817,10 @@ void cVideo::getPictureInfo(int &width, int &height, int &rate)
if (fd == -1) if (fd == -1)
{ {
/* in movieplayer mode, fd is not opened -> fall back to procfs */ /* in movieplayer mode, fd is not opened -> fall back to procfs */
r = proc_get_hex(VMPEG_framerate[devnum]); char buf[16];
int n = proc_get(VMPEG_framerate[devnum], buf, 16);
if (n > 0)
sscanf(buf, "%i", &r);
width = proc_get_hex(VMPEG_xres[devnum]); width = proc_get_hex(VMPEG_xres[devnum]);
height = proc_get_hex(VMPEG_yres[devnum]); height = proc_get_hex(VMPEG_yres[devnum]);
rate = rate2csapi(r); rate = rate2csapi(r);