Skip to content

Commit

Permalink
[library] ffmpeg goto end: on uninit vars as per codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
whatdoineed2do/Ray committed Dec 2, 2023
1 parent 2c3e635 commit 376d2b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/library/filescanner_ffmpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,21 +809,21 @@ file_write_rating(AVFormatContext* in_fmt_ctx, const char* new_rating_file)
{
int ret;

AVFormatContext *out_fmt_ctx;
AVFormatContext *out_fmt_ctx = NULL;
AVPacket pkt;
const AVDictionaryEntry *tag;
AVDictionary *opts;
AVStream *out_stream;
AVStream *in_stream;
AVCodecParameters *in_codecpar;
#if (LIBAVCODEC_VERSION_MAJOR > 59) || ((LIBAVCODEC_VERSION_MAJOR == 59) && (LIBAVCODEC_VERSION_MINOR > 24))
#if (LIBAVCODEC_VERSION_MAJOR > 59) || ((LIBAVCODEC_VERSION_MAJOR == 59) && (LIBAVCODEC_VERSION_MINOR >= 0) && (LIBAVCODEC_VERSION_MICRO >= 24))
const
#endif
struct AVOutputFormat *out_fmt;
struct AVOutputFormat *out_fmt = NULL;

int i;
int stream_idx;
int *stream_mapping;
int *stream_mapping = NULL;


if ((ret = avformat_find_stream_info (in_fmt_ctx, NULL)) < 0)
Expand Down

0 comments on commit 376d2b1

Please sign in to comment.