Don't stop on hwdec failure
Some platforms may not support harware decoding, unsure if this would mean that the hwdec option string would no longer work but falling back to software decode shouldn't be an issue. Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
This commit is contained in:
parent
19036f5b74
commit
014e758361
|
@ -210,10 +210,7 @@ static void context_reset(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mpv_set_option_string(mpv, "hwdec", "auto") < 0)
|
if(mpv_set_option_string(mpv, "hwdec", "auto") < 0)
|
||||||
{
|
log_cb(RETRO_LOG_ERROR, "failed to set hwdec option");
|
||||||
log_cb(RETRO_LOG_ERROR, "failed to enable hwdec");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(mpv_command(mpv, cmd) != 0)
|
if(mpv_command(mpv, cmd) != 0)
|
||||||
{
|
{
|
||||||
|
@ -221,14 +218,14 @@ static void context_reset(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Keep trying until mpv accepts the property.
|
/* Keep trying until mpv accepts the property. This is done to seek to the
|
||||||
* This is done to seek to the point in the file after the previous context
|
* point in the file after the previous context was destroyed. If no
|
||||||
* was destroyed. If now context was destroyed previously, the file seeks
|
* context was destroyed previously, the file seeks to 0.
|
||||||
* to 0.
|
|
||||||
*
|
*
|
||||||
* This also seems to fix some black screen issues.
|
* This also seems to fix some black screen issues.
|
||||||
*/
|
*/
|
||||||
while(mpv_set_property(mpv, "playback-time", MPV_FORMAT_INT64, &playback_time) < 0)
|
while(mpv_set_property(mpv,
|
||||||
|
"playback-time", MPV_FORMAT_INT64, &playback_time) < 0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
log_cb(RETRO_LOG_INFO, "Context reset.\n");
|
log_cb(RETRO_LOG_INFO, "Context reset.\n");
|
||||||
|
|
Loading…
Reference in New Issue