Skip to content

Commit

Permalink
Make compiler happy
Browse files Browse the repository at this point in the history
  • Loading branch information
msg7086 committed Feb 10, 2025
1 parent 656dfbf commit 6197801
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions common/lwindex_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static int parse_stream_info(char *content, char *line, stream_info_entry_t *str
}
else if (stream_info->codec_type == AV_STREAM_TYPE_AUDIO) {
// Codec=86019,TimeBase=1/90000,Channels=6:0x60f,Rate=48000,Format=fltp,BPS=32
if (sscanf(line, "Codec=%d,TimeBase=%d/%d,Channels=%d:0x%llx,Rate=%d,Format=%[^,],BPS=%d",
if (sscanf(line, "Codec=%d,TimeBase=%d/%d,Channels=%d:0x%" SCNx64 ",Rate=%d,Format=%[^,],BPS=%d",
&stream_info->codec,
&stream_info->time_base.num, &stream_info->time_base.den,
&stream_info->data.type1.channels,
Expand All @@ -265,7 +265,7 @@ static int parse_extra_data_entry(char *line, int codec_type, extra_data_entry_t
}
else if (codec_type == AV_STREAM_TYPE_AUDIO) {
// Size=0,Codec=86060,4CC=0x332d4341,Layout=0x63f,Rate=48000,Format=s32,BPS=24,Align=0
if (sscanf(line, "Size=%d,Codec=%d,4CC=0x%x,Layout=%llx,Rate=%d,Format=%[^,],BPS=%d,Align=%" SCNu16,
if (sscanf(line, "Size=%d,Codec=%d,4CC=0x%x,Layout=0x%" SCNx64 ",Rate=%d,Format=%[^,],BPS=%d,Align=%" SCNu16,
&extra_data->size, &extra_data->codec, &extra_data->fourcc,
&extra_data->data.type1.layout, &extra_data->data.type1.sample_rate, extra_data->format,
&extra_data->bits_per_sample, &extra_data->data.type1.block_align) != 8) {
Expand Down
2 changes: 0 additions & 2 deletions common/lwindex_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,11 @@ typedef struct {

typedef struct {
char lsmash_works_index_version[16];

int libav_reader_index_file;
char input_file_path[MAX_FILE_PATH_LENGTH];
uint64_t file_size;
int64_t file_last_modification_time;
uint64_t file_hash;
char libav_reader_index[64]; // Store as string
char format_name[256];
int format_flags;
int raw_demuxer;
Expand Down
1 change: 1 addition & 0 deletions common/lwindex_sscanf_unrolled.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <string.h>
#include <limits.h>
#include <errno.h>

#define PARSE_OR_RETURN(buf, needle, out, type) \
if (strncmp(buf, needle, strlen(needle)) != 0) \
Expand Down

0 comments on commit 6197801

Please sign in to comment.