mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 15:33:00 +02:00
sync
This commit is contained in:
@@ -59,13 +59,13 @@
|
||||
static short debug_level = 10;
|
||||
|
||||
#define ffmpeg_printf(level, fmt, x...) do { \
|
||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define ffmpeg_printf(level, fmt, x...)
|
||||
#endif
|
||||
|
||||
#ifndef FFMPEG_SILENT
|
||||
#define ffmpeg_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#define ffmpeg_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define ffmpeg_err(fmt, x...)
|
||||
#endif
|
||||
@@ -83,7 +83,7 @@ if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x);
|
||||
#define cERR_CONTAINER_FFMPEG_ERR -9
|
||||
#define cERR_CONTAINER_FFMPEG_END_OF_FILE -10
|
||||
|
||||
static const char* FILENAME = __FILE__;
|
||||
static const char* FILENAME = "container_ffmpeg.c";
|
||||
|
||||
/* ***************************** */
|
||||
/* Types */
|
||||
@@ -909,15 +909,17 @@ int container_ffmpeg_init(Context_t *context, char * filename)
|
||||
}
|
||||
|
||||
avContext->flags = AVFMT_FLAG_GENPTS;
|
||||
if (context->playback->noprobe)
|
||||
avContext->max_analyze_duration = 1;
|
||||
|
||||
ffmpeg_printf(20, "find_streaminfo\n");
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
if (av_find_stream_info(avContext) < 0) {
|
||||
ffmpeg_err("Error avformat_find_stream_info\n");
|
||||
ffmpeg_err("Error av_find_stream_info\n");
|
||||
#else
|
||||
if (avformat_find_stream_info(avContext, NULL) < 0) {
|
||||
ffmpeg_err("Error av_find_stream_info\n");
|
||||
ffmpeg_err("Error avformat_find_stream_info\n");
|
||||
#endif
|
||||
#ifdef this_is_ok
|
||||
/* crow reports that sometimes this returns an error
|
||||
|
@@ -50,13 +50,13 @@
|
||||
static short debug_level = 10;
|
||||
|
||||
#define srt_printf(level, fmt, x...) do { \
|
||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define srt_printf(level, fmt, x...)
|
||||
#endif
|
||||
|
||||
#ifndef SRT_SILENT
|
||||
#define srt_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#define srt_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define srt_err(fmt, x...)
|
||||
#endif
|
||||
@@ -68,7 +68,7 @@ if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x);
|
||||
#define TRACKWRAP 20
|
||||
#define MAXLINELENGTH 80
|
||||
|
||||
static const char FILENAME[] = __FILE__;
|
||||
static const char FILENAME[] = "text_srt.c";
|
||||
|
||||
/* ***************************** */
|
||||
/* Types */
|
||||
@@ -290,14 +290,14 @@ static int SrtGetSubtitle(Context_t *context, char * Filename) {
|
||||
|
||||
copyFilename = strdup(Filename);
|
||||
|
||||
FilenameFolder = dirname(copyFilename);
|
||||
|
||||
if (FilenameFolder == NULL)
|
||||
if (copyFilename == NULL)
|
||||
{
|
||||
srt_err("FilenameFolder NULL\n");
|
||||
srt_err("copyFilename NULL\n");
|
||||
return cERR_SRT_ERROR;
|
||||
}
|
||||
|
||||
FilenameFolder = dirname(copyFilename);
|
||||
|
||||
srt_printf(10, "folder: %s\n", FilenameFolder);
|
||||
|
||||
getExtension(copyFilename, &FilenameExtension);
|
||||
@@ -305,7 +305,7 @@ static int SrtGetSubtitle(Context_t *context, char * Filename) {
|
||||
if (FilenameExtension == NULL)
|
||||
{
|
||||
srt_err("FilenameExtension NULL\n");
|
||||
free(FilenameFolder);
|
||||
free(copyFilename);
|
||||
return cERR_SRT_ERROR;
|
||||
}
|
||||
|
||||
|
@@ -50,13 +50,13 @@
|
||||
static short debug_level = 10;
|
||||
|
||||
#define ssa_printf(level, fmt, x...) do { \
|
||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define ssa_printf(level, fmt, x...)
|
||||
#endif
|
||||
|
||||
#ifndef SSA_SILENT
|
||||
#define ssa_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#define ssa_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define ssa_err(fmt, x...)
|
||||
#endif
|
||||
@@ -71,7 +71,7 @@ if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x);
|
||||
//Buffer size used in getLine function. Do not set to value less than 1 !!!
|
||||
#define SSA_BUFFER_SIZE 14
|
||||
|
||||
static const char FILENAME[] = __FILE__;
|
||||
static const char FILENAME[] = "text_ssa.c";
|
||||
|
||||
/* ***************************** */
|
||||
/* Types */
|
||||
@@ -291,14 +291,14 @@ static int SsaGetSubtitle(Context_t *context, char * Filename) {
|
||||
|
||||
copyFilename = strdup(Filename);
|
||||
|
||||
FilenameFolder = dirname(copyFilename);
|
||||
|
||||
if (FilenameFolder == NULL)
|
||||
if (copyFilename == NULL)
|
||||
{
|
||||
ssa_err("FilenameFolder NULL\n");
|
||||
ssa_err("copyFilename NULL\n");
|
||||
return cERR_SSA_ERROR;
|
||||
}
|
||||
|
||||
FilenameFolder = dirname(copyFilename);
|
||||
|
||||
ssa_printf(10, "folder: %s\n", FilenameFolder);
|
||||
|
||||
getExtension(copyFilename, &FilenameExtension);
|
||||
@@ -306,7 +306,7 @@ static int SsaGetSubtitle(Context_t *context, char * Filename) {
|
||||
if (FilenameExtension == NULL)
|
||||
{
|
||||
ssa_err("FilenameExtension NULL\n");
|
||||
free(FilenameFolder);
|
||||
free(copyFilename);
|
||||
return cERR_SSA_ERROR;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user