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:
Jacek Jendrzej
2020-01-09 21:32:07 +01:00
committed by vanhofen
parent 5b15371965
commit f7b8539ee2
5 changed files with 13 additions and 8 deletions

View File

@@ -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
}

View File

@@ -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;

View File

@@ -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;
}