mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
fix compiler warnings
Origin commit data
------------------
Branch: master
Commit: cd387592d0
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-09 (Thu, 09 Jan 2020)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1772,9 +1772,9 @@ int32_t container_ffmpeg_init_av_context(Context_t *context, char *filename, uin
|
||||
|
||||
if (2 == haveNativeProto)
|
||||
{
|
||||
filename = malloc(strlen(baseUri) + 2 + 1);
|
||||
strncpy(filename, "ff", 2);
|
||||
strcpy(filename + 2, baseUri);
|
||||
int len = strlen(baseUri) + 2 + 1;
|
||||
filename = malloc(len);
|
||||
snprintf(filename,len,"ff%s",baseUri);
|
||||
free(baseUri);
|
||||
// memory leak, only once, so does not matter
|
||||
}
|
||||
|
@@ -685,7 +685,7 @@ static int ParseParams(int argc, char *argv[], PlayFiles_t *playbackFiles, int *
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
system("echo 'encoder' > /proc/stb/avs/0/input");
|
||||
int ignored __attribute__((unused)) = system("echo 'encoder' > /proc/stb/avs/0/input");
|
||||
|
||||
pthread_t termThread;
|
||||
int isTermThreadStarted = 0;
|
||||
|
@@ -193,9 +193,9 @@ static int PlaybackOpen(Context_t *context, PlayFiles_t *pFiles)
|
||||
if (!strncmp("mms://", uri, 6))
|
||||
{
|
||||
// mms is in reality called rtsp, and ffmpeg expects this
|
||||
int len = strlen(uri) + 2;
|
||||
char *tUri = (char *)malloc(strlen(uri) + 2);
|
||||
strncpy(tUri + 1, uri, strlen(uri) + 1);
|
||||
strncpy(tUri, "rtsp", 4);
|
||||
snprintf(tUri,len,"rtsp%s",uri+3);
|
||||
free(context->playback->uri);
|
||||
context->playback->uri = tUri;
|
||||
}
|
||||
|
@@ -313,7 +313,9 @@ void GLFramebuffer::run()
|
||||
ev.type = EV_KEY;
|
||||
gettimeofday(&ev.time, NULL);
|
||||
hal_debug_c("GLFB::%s: pushing 0x%x\n", __func__, ev.code);
|
||||
write(glfb_priv->input_fd, &ev, sizeof(ev));
|
||||
ssize_t w = write(glfb_priv->input_fd, &ev, sizeof(ev));
|
||||
if(w < 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -401,6 +403,7 @@ void GLFbPC::render()
|
||||
zoom = av_q2d(mVA) * av_q2d(a149) / av_q2d(mOA);
|
||||
break;
|
||||
}
|
||||
// fall through
|
||||
/* fallthrough for output format 14:9 */
|
||||
case DISPLAY_AR_MODE_PANSCAN:
|
||||
zoom = av_q2d(mOA) / av_q2d(mVA);
|
||||
|
@@ -36,8 +36,10 @@ hw_caps_t *get_hwcaps(void)
|
||||
caps.display_has_statusline = 0;
|
||||
strcpy(caps.boxvendor, "Generic");
|
||||
strcpy(caps.boxname, "PC");
|
||||
if (! uname(&u))
|
||||
if (! uname(&u)){
|
||||
strncpy(caps.boxarch, u.machine, sizeof(caps.boxarch));
|
||||
caps.boxarch[sizeof(caps.boxarch)-1] = '\0';
|
||||
}
|
||||
else
|
||||
fprintf(stderr, "%s: uname() failed: %m\n", __func__);
|
||||
|
||||
|
Reference in New Issue
Block a user