ShowPicture: return boolean expression

Origin commit data
------------------
Branch: master
Commit: 90c3600026
Author: GetAway <get-away@t-online.de>
Date: 2019-03-12 (Tue, 12 Mar 2019)


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

------------------
This commit was generated by Migit
This commit is contained in:
GetAway
2019-03-12 21:59:42 +01:00
committed by max_10
parent 143d5769bd
commit 465d0482ea
12 changed files with 54 additions and 29 deletions

View File

@@ -235,8 +235,9 @@ void cVideo::SetVideoMode(analog_mode_t)
{
}
void cVideo::ShowPicture(const char *fname)
bool cVideo::ShowPicture(const char *fname)
{
bool ret = false;
hal_info("%s(%s)\n", __func__, fname);
if (access(fname, R_OK))
return;
@@ -260,7 +261,7 @@ void cVideo::ShowPicture(const char *fname)
if (avformat_open_input(&avfc, fname, NULL, NULL) < 0) {
hal_info("%s: Could not open file %s\n", __func__, fname);
return;
return ret;
}
if (avformat_find_stream_info(avfc, NULL) < 0) {
@@ -333,6 +334,7 @@ void cVideo::ShowPicture(const char *fname)
buf_num--;
}
buf_m.unlock();
ret = true;
}
}
av_packet_unref(&avpkt);
@@ -344,6 +346,7 @@ void cVideo::ShowPicture(const char *fname)
out_close:
avformat_close_input(&avfc);
hal_debug("%s(%s) end\n", __func__, fname);
return ret;
}
void cVideo::StopPicture()