Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
fd38a15a
Commit
fd38a15a
authored
May 29, 2011
by
Clément Bœsch
Committed by
Michael Niedermayer
May 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix various bad printf format warnings
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
bb9b7bc6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
mxfdec.c
libavformat/mxfdec.c
+4
-4
r3d.c
libavformat/r3d.c
+6
-6
utils.c
libavformat/utils.c
+1
-1
No files found.
libavformat/mxfdec.c
View file @
fd38a15a
...
@@ -309,7 +309,7 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -309,7 +309,7 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
if
(
klv_read_packet
(
&
klv
,
s
->
pb
)
<
0
)
if
(
klv_read_packet
(
&
klv
,
s
->
pb
)
<
0
)
return
-
1
;
return
-
1
;
PRINT_KEY
(
s
,
"read packet"
,
klv
.
key
);
PRINT_KEY
(
s
,
"read packet"
,
klv
.
key
);
av_dlog
(
s
,
"size %
lld offset %#llx
\n
"
,
klv
.
length
,
klv
.
offset
);
av_dlog
(
s
,
"size %
"
PRIu64
" offset %#"
PRIx64
"
\n
"
,
klv
.
length
,
klv
.
offset
);
if
(
IS_KLV_KEY
(
klv
.
key
,
mxf_encrypted_triplet_key
))
{
if
(
IS_KLV_KEY
(
klv
.
key
,
mxf_encrypted_triplet_key
))
{
int
res
=
mxf_decrypt_triplet
(
s
,
pkt
,
&
klv
);
int
res
=
mxf_decrypt_triplet
(
s
,
pkt
,
&
klv
);
if
(
res
<
0
)
{
if
(
res
<
0
)
{
...
@@ -522,8 +522,8 @@ static int mxf_read_index_table_segment(void *arg, AVIOContext *pb, int tag, int
...
@@ -522,8 +522,8 @@ static int mxf_read_index_table_segment(void *arg, AVIOContext *pb, int tag, int
case
0x3F06
:
av_dlog
(
NULL
,
"IndexSID %d
\n
"
,
avio_rb32
(
pb
));
break
;
case
0x3F06
:
av_dlog
(
NULL
,
"IndexSID %d
\n
"
,
avio_rb32
(
pb
));
break
;
case
0x3F07
:
av_dlog
(
NULL
,
"BodySID %d
\n
"
,
avio_rb32
(
pb
));
break
;
case
0x3F07
:
av_dlog
(
NULL
,
"BodySID %d
\n
"
,
avio_rb32
(
pb
));
break
;
case
0x3F0B
:
av_dlog
(
NULL
,
"IndexEditRate %d/%d
\n
"
,
avio_rb32
(
pb
),
avio_rb32
(
pb
));
break
;
case
0x3F0B
:
av_dlog
(
NULL
,
"IndexEditRate %d/%d
\n
"
,
avio_rb32
(
pb
),
avio_rb32
(
pb
));
break
;
case
0x3F0C
:
av_dlog
(
NULL
,
"IndexStartPosition %
lld
\n
"
,
avio_rb64
(
pb
));
break
;
case
0x3F0C
:
av_dlog
(
NULL
,
"IndexStartPosition %
"
PRId64
"
\n
"
,
avio_rb64
(
pb
));
break
;
case
0x3F0D
:
av_dlog
(
NULL
,
"IndexDuration %
lld
\n
"
,
avio_rb64
(
pb
));
break
;
case
0x3F0D
:
av_dlog
(
NULL
,
"IndexDuration %
"
PRId64
"
\n
"
,
avio_rb64
(
pb
));
break
;
}
}
return
0
;
return
0
;
}
}
...
@@ -920,7 +920,7 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -920,7 +920,7 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
if
(
klv_read_packet
(
&
klv
,
s
->
pb
)
<
0
)
if
(
klv_read_packet
(
&
klv
,
s
->
pb
)
<
0
)
return
-
1
;
return
-
1
;
PRINT_KEY
(
s
,
"read header"
,
klv
.
key
);
PRINT_KEY
(
s
,
"read header"
,
klv
.
key
);
av_dlog
(
s
,
"size %
lld offset %#llx
\n
"
,
klv
.
length
,
klv
.
offset
);
av_dlog
(
s
,
"size %
"
PRId64
" offset %#"
PRIx64
"
\n
"
,
klv
.
length
,
klv
.
offset
);
if
(
IS_KLV_KEY
(
klv
.
key
,
mxf_encrypted_triplet_key
)
||
if
(
IS_KLV_KEY
(
klv
.
key
,
mxf_encrypted_triplet_key
)
||
IS_KLV_KEY
(
klv
.
key
,
mxf_essence_element_key
))
{
IS_KLV_KEY
(
klv
.
key
,
mxf_essence_element_key
))
{
/* FIXME avoid seek */
/* FIXME avoid seek */
...
...
libavformat/r3d.c
View file @
fd38a15a
...
@@ -43,7 +43,7 @@ static int read_atom(AVFormatContext *s, Atom *atom)
...
@@ -43,7 +43,7 @@ static int read_atom(AVFormatContext *s, Atom *atom)
if
(
atom
->
size
<
8
)
if
(
atom
->
size
<
8
)
return
-
1
;
return
-
1
;
atom
->
tag
=
avio_rl32
(
s
->
pb
);
atom
->
tag
=
avio_rl32
(
s
->
pb
);
av_dlog
(
s
,
"atom %d %.4s offset %#
llx
\n
"
,
av_dlog
(
s
,
"atom %d %.4s offset %#
"
PRIx64
"
\n
"
,
atom
->
size
,
(
char
*
)
&
atom
->
tag
,
atom
->
offset
);
atom
->
size
,
(
char
*
)
&
atom
->
tag
,
atom
->
offset
);
return
atom
->
size
;
return
atom
->
size
;
}
}
...
@@ -131,7 +131,7 @@ static int r3d_read_rdvo(AVFormatContext *s, Atom *atom)
...
@@ -131,7 +131,7 @@ static int r3d_read_rdvo(AVFormatContext *s, Atom *atom)
if
(
st
->
codec
->
time_base
.
den
)
if
(
st
->
codec
->
time_base
.
den
)
st
->
duration
=
(
uint64_t
)
r3d
->
video_offsets_count
*
st
->
duration
=
(
uint64_t
)
r3d
->
video_offsets_count
*
st
->
time_base
.
den
*
st
->
codec
->
time_base
.
num
/
st
->
codec
->
time_base
.
den
;
st
->
time_base
.
den
*
st
->
codec
->
time_base
.
num
/
st
->
codec
->
time_base
.
den
;
av_dlog
(
s
,
"duration %
lld
\n
"
,
st
->
duration
);
av_dlog
(
s
,
"duration %
"
PRId64
"
\n
"
,
st
->
duration
);
return
0
;
return
0
;
}
}
...
@@ -176,7 +176,7 @@ static int r3d_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -176,7 +176,7 @@ static int r3d_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
}
s
->
data_offset
=
avio_tell
(
s
->
pb
);
s
->
data_offset
=
avio_tell
(
s
->
pb
);
av_dlog
(
s
,
"data offset %#
llx
\n
"
,
s
->
data_offset
);
av_dlog
(
s
,
"data offset %#
"
PRIx64
"
\n
"
,
s
->
data_offset
);
if
(
!
s
->
pb
->
seekable
)
if
(
!
s
->
pb
->
seekable
)
return
0
;
return
0
;
// find REOB/REOF/REOS to load index
// find REOB/REOF/REOS to load index
...
@@ -255,7 +255,7 @@ static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom)
...
@@ -255,7 +255,7 @@ static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom)
if
(
st
->
codec
->
time_base
.
den
)
if
(
st
->
codec
->
time_base
.
den
)
pkt
->
duration
=
(
uint64_t
)
st
->
time_base
.
den
*
pkt
->
duration
=
(
uint64_t
)
st
->
time_base
.
den
*
st
->
codec
->
time_base
.
num
/
st
->
codec
->
time_base
.
den
;
st
->
codec
->
time_base
.
num
/
st
->
codec
->
time_base
.
den
;
av_dlog
(
s
,
"pkt dts %
lld
duration %d
\n
"
,
pkt
->
dts
,
pkt
->
duration
);
av_dlog
(
s
,
"pkt dts %
"
PRId64
"
duration %d
\n
"
,
pkt
->
dts
,
pkt
->
duration
);
return
0
;
return
0
;
}
}
...
@@ -299,7 +299,7 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
...
@@ -299,7 +299,7 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
pkt
->
stream_index
=
1
;
pkt
->
stream_index
=
1
;
pkt
->
dts
=
dts
;
pkt
->
dts
=
dts
;
pkt
->
duration
=
av_rescale
(
samples
,
st
->
time_base
.
den
,
st
->
codec
->
sample_rate
);
pkt
->
duration
=
av_rescale
(
samples
,
st
->
time_base
.
den
,
st
->
codec
->
sample_rate
);
av_dlog
(
s
,
"pkt dts %
lld
duration %d samples %d sample rate %d
\n
"
,
av_dlog
(
s
,
"pkt dts %
"
PRId64
"
duration %d samples %d sample rate %d
\n
"
,
pkt
->
dts
,
pkt
->
duration
,
samples
,
st
->
codec
->
sample_rate
);
pkt
->
dts
,
pkt
->
duration
,
samples
,
st
->
codec
->
sample_rate
);
return
0
;
return
0
;
...
@@ -356,7 +356,7 @@ static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, i
...
@@ -356,7 +356,7 @@ static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, i
frame_num
=
sample_time
*
st
->
codec
->
time_base
.
den
/
frame_num
=
sample_time
*
st
->
codec
->
time_base
.
den
/
((
int64_t
)
st
->
codec
->
time_base
.
num
*
st
->
time_base
.
den
);
((
int64_t
)
st
->
codec
->
time_base
.
num
*
st
->
time_base
.
den
);
av_dlog
(
s
,
"seek frame num %d timestamp %
lld
\n
"
,
frame_num
,
sample_time
);
av_dlog
(
s
,
"seek frame num %d timestamp %
"
PRId64
"
\n
"
,
frame_num
,
sample_time
);
if
(
frame_num
<
r3d
->
video_offsets_count
)
{
if
(
frame_num
<
r3d
->
video_offsets_count
)
{
avio_seek
(
s
->
pb
,
r3d
->
video_offsets_count
,
SEEK_SET
);
avio_seek
(
s
->
pb
,
r3d
->
video_offsets_count
,
SEEK_SET
);
...
...
libavformat/utils.c
View file @
fd38a15a
...
@@ -2334,7 +2334,7 @@ int av_find_stream_info(AVFormatContext *ic)
...
@@ -2334,7 +2334,7 @@ int av_find_stream_info(AVFormatContext *ic)
if
(
st
->
codec_info_nb_frames
>
1
)
{
if
(
st
->
codec_info_nb_frames
>
1
)
{
int64_t
t
;
int64_t
t
;
if
(
st
->
time_base
.
den
>
0
&&
(
t
=
av_rescale_q
(
st
->
info
->
codec_info_duration
,
st
->
time_base
,
AV_TIME_BASE_Q
))
>=
ic
->
max_analyze_duration
)
{
if
(
st
->
time_base
.
den
>
0
&&
(
t
=
av_rescale_q
(
st
->
info
->
codec_info_duration
,
st
->
time_base
,
AV_TIME_BASE_Q
))
>=
ic
->
max_analyze_duration
)
{
av_log
(
ic
,
AV_LOG_WARNING
,
"max_analyze_duration %d reached at %
Ld
\n
"
,
ic
->
max_analyze_duration
,
t
);
av_log
(
ic
,
AV_LOG_WARNING
,
"max_analyze_duration %d reached at %
"
PRId64
"
\n
"
,
ic
->
max_analyze_duration
,
t
);
break
;
break
;
}
}
st
->
info
->
codec_info_duration
+=
pkt
->
duration
;
st
->
info
->
codec_info_duration
+=
pkt
->
duration
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment