mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
bugfix-last-commits
Origin commit data
------------------
Branch: master
Commit: d438aa31d3
Author: max_10 <max_10@gmx.de>
Date: 2018-04-11 (Wed, 11 Apr 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -117,7 +117,7 @@ bool cPlayback::Start(char *filename, int vpid, int vtype, int apid, int ac3, in
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
isHTTP = true;
|
isHTTP = true;
|
||||||
PlayFiles_t playbackFiles = { (char *) file.c_str(), NULL};
|
PlayFiles_t playbackFiles = { (char *) file.c_str(), NULL, NULL, NULL, 0, 0, 0, 0};
|
||||||
if (player->playback->Command(player, PLAYBACK_OPEN, &playbackFiles) == 0)
|
if (player->playback->Command(player, PLAYBACK_OPEN, &playbackFiles) == 0)
|
||||||
{
|
{
|
||||||
if (pm == PLAYMODE_TS)
|
if (pm == PLAYMODE_TS)
|
||||||
|
@@ -1378,14 +1378,14 @@ int SAM_ReadFunc(void *ptr, uint8_t *buffer, int lSize)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (io->iOffset < io->iMoovAtomOffset)
|
if ((uint64_t)io->iOffset < io->iMoovAtomOffset)
|
||||||
{
|
{
|
||||||
ret = (int)fread((void *) buffer, (size_t) 1, (size_t) lSize, io->pFile);
|
ret = (int)fread((void *) buffer, (size_t) 1, (size_t) lSize, io->pFile);
|
||||||
buffer += ret;
|
buffer += ret;
|
||||||
lSize -= ret;
|
lSize -= ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (io->iOffset + ret >= io->iMoovAtomOffset)
|
if ((uint64_t)io->iOffset + ret >= io->iMoovAtomOffset)
|
||||||
{
|
{
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
@@ -1440,12 +1440,12 @@ int64_t SAM_SeekFunc(void *ptr, int64_t pos, int whence)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret >= 0 && ret <= io->iFileSize)
|
if (ret >= 0 && (uint64_t)ret <= io->iFileSize)
|
||||||
{
|
{
|
||||||
if (ret < io->iMoovAtomOffset)
|
if ((uint64_t)ret < io->iMoovAtomOffset)
|
||||||
{
|
{
|
||||||
if (!fseeko(io->pFile, (off_t)ret, SEEK_SET))
|
if (!fseeko(io->pFile, (off_t)ret, SEEK_SET))
|
||||||
io->iOffset = ret;
|
io->iOffset = (uint64_t)ret;
|
||||||
else
|
else
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
@@ -1520,7 +1520,7 @@ int32_t container_ffmpeg_init_av_context(Context_t *context, char *filename, uin
|
|||||||
{
|
{
|
||||||
AVIOContext *avio_ctx = NULL;
|
AVIOContext *avio_ctx = NULL;
|
||||||
custom_io_tab[AVIdx] = malloc(sizeof(CustomIOCtx_t));
|
custom_io_tab[AVIdx] = malloc(sizeof(CustomIOCtx_t));
|
||||||
sizeof(custom_io_tab[AVIdx], 0x00, sizeof(CustomIOCtx_t));
|
memset(custom_io_tab[AVIdx], 0x00, sizeof(CustomIOCtx_t));
|
||||||
|
|
||||||
custom_io_tab[AVIdx]->szFile = filename;
|
custom_io_tab[AVIdx]->szFile = filename;
|
||||||
custom_io_tab[AVIdx]->iFileSize = fileSize;
|
custom_io_tab[AVIdx]->iFileSize = fileSize;
|
||||||
@@ -2690,7 +2690,12 @@ static int32_t container_ffmpeg_stop(Context_t *context)
|
|||||||
* avformat_close_input do not expect custom io, so it try
|
* avformat_close_input do not expect custom io, so it try
|
||||||
* to release incorrectly
|
* to release incorrectly
|
||||||
*/
|
*/
|
||||||
fclose(avContextTab[i]->pb->opaque);
|
CustomIOCtx_t *io = (CustomIOCtx_t *)avContextTab[i]->pb->opaque;
|
||||||
|
if (io->pFile)
|
||||||
|
fclose(io->pFile);
|
||||||
|
if (io->pMoovFile)
|
||||||
|
fclose(io->pMoovFile);
|
||||||
|
free(custom_io_tab[i]);
|
||||||
av_freep(&(avContextTab[i]->pb->buffer));
|
av_freep(&(avContextTab[i]->pb->buffer));
|
||||||
av_freep(&(avContextTab[i]->pb));
|
av_freep(&(avContextTab[i]->pb));
|
||||||
use_custom_io[i] = 0;
|
use_custom_io[i] = 0;
|
||||||
@@ -3295,4 +3300,4 @@ Container_t FFMPEGContainer =
|
|||||||
"FFMPEG",
|
"FFMPEG",
|
||||||
&Command,
|
&Command,
|
||||||
FFMPEG_Capabilities
|
FFMPEG_Capabilities
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user