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
724cf83f
Commit
724cf83f
authored
Sep 21, 2017
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some unneeded casts of bit_rate.
parent
c34c0e3a
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
22 additions
and
22 deletions
+22
-22
ffserver.c
ffserver.c
+1
-1
dcaenc.c
libavcodec/dcaenc.c
+1
-1
libfdk-aacenc.c
libavcodec/libfdk-aacenc.c
+1
-1
libgsmenc.c
libavcodec/libgsmenc.c
+1
-1
libopusenc.c
libavcodec/libopusenc.c
+2
-2
libspeexenc.c
libavcodec/libspeexenc.c
+2
-2
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+1
-1
pcm-bluray.c
libavcodec/pcm-bluray.c
+1
-1
pcm-dvd.c
libavcodec/pcm-dvd.c
+1
-1
sipr.c
libavcodec/sipr.c
+1
-1
utils.c
libavcodec/utils.c
+2
-2
wma.c
libavcodec/wma.c
+1
-1
wmaenc.c
libavcodec/wmaenc.c
+1
-1
fbdev_dec.c
libavdevice/fbdev_dec.c
+1
-1
sdp.c
libavformat/sdp.c
+1
-1
smoothstreamingenc.c
libavformat/smoothstreamingenc.c
+3
-3
vqf.c
libavformat/vqf.c
+1
-1
No files found.
ffserver.c
View file @
724cf83f
...
...
@@ -1916,7 +1916,7 @@ static inline void print_stream_params(AVIOContext *pb, FFServerStream *stream)
avio_printf
(
pb
,
"<tr><td>%d<td>%s<td>%"
PRId64
"<td>%s<td>%s
\n
"
,
i
,
type
,
(
int64_t
)
st
->
codecpar
->
bit_rate
/
1000
,
i
,
type
,
st
->
codecpar
->
bit_rate
/
1000
,
codec
?
codec
->
name
:
""
,
parameters
);
}
...
...
libavcodec/dcaenc.c
View file @
724cf83f
...
...
@@ -216,7 +216,7 @@ static int encode_init(AVCodecContext *avctx)
c
->
samplerate_index
=
i
;
if
(
avctx
->
bit_rate
<
32000
||
avctx
->
bit_rate
>
3840000
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Bit rate %"
PRId64
" not supported."
,
(
int64_t
)
avctx
->
bit_rate
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Bit rate %"
PRId64
" not supported."
,
avctx
->
bit_rate
);
return
AVERROR
(
EINVAL
);
}
for
(
i
=
0
;
ff_dca_bit_rates
[
i
]
<
avctx
->
bit_rate
;
i
++
)
...
...
libavcodec/libfdk-aacenc.c
View file @
724cf83f
...
...
@@ -216,7 +216,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
if
((
err
=
aacEncoder_SetParam
(
s
->
handle
,
AACENC_BITRATE
,
avctx
->
bit_rate
))
!=
AACENC_OK
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unable to set the bitrate %"
PRId64
": %s
\n
"
,
(
int64_t
)
avctx
->
bit_rate
,
aac_get_error
(
err
));
avctx
->
bit_rate
,
aac_get_error
(
err
));
goto
error
;
}
}
...
...
libavcodec/libgsmenc.c
View file @
724cf83f
...
...
@@ -63,7 +63,7 @@ static av_cold int libgsm_encode_init(AVCodecContext *avctx) {
avctx
->
bit_rate
!=
13200
/* Very common */
&&
avctx
->
bit_rate
!=
0
/* Unknown; a.o. mov does not set bitrate when decoding */
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Bitrate 13000bps required for GSM, got %"
PRId64
"bps
\n
"
,
(
int64_t
)
avctx
->
bit_rate
);
avctx
->
bit_rate
);
if
(
avctx
->
strict_std_compliance
>
FF_COMPLIANCE_UNOFFICIAL
)
return
-
1
;
}
...
...
libavcodec/libopusenc.c
View file @
724cf83f
...
...
@@ -351,12 +351,12 @@ static av_cold int libopus_encode_init(AVCodecContext *avctx)
avctx
->
bit_rate
=
64000
*
opus
->
stream_count
+
32000
*
coupled_stream_count
;
av_log
(
avctx
,
AV_LOG_WARNING
,
"No bit rate set. Defaulting to %"
PRId64
" bps.
\n
"
,
(
int64_t
)
avctx
->
bit_rate
);
"No bit rate set. Defaulting to %"
PRId64
" bps.
\n
"
,
avctx
->
bit_rate
);
}
if
(
avctx
->
bit_rate
<
500
||
avctx
->
bit_rate
>
256000
*
avctx
->
channels
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"The bit rate %"
PRId64
" bps is unsupported. "
"Please choose a value between 500 and %d.
\n
"
,
(
int64_t
)
avctx
->
bit_rate
,
"Please choose a value between 500 and %d.
\n
"
,
avctx
->
bit_rate
,
256000
*
avctx
->
channels
);
ret
=
AVERROR
(
EINVAL
);
goto
fail
;
...
...
libavcodec/libspeexenc.c
View file @
724cf83f
...
...
@@ -125,10 +125,10 @@ static av_cold void print_enc_params(AVCodecContext *avctx,
av_log
(
avctx
,
AV_LOG_DEBUG
,
" quality: %f
\n
"
,
s
->
vbr_quality
);
}
else
if
(
s
->
abr
)
{
av_log
(
avctx
,
AV_LOG_DEBUG
,
"rate control: ABR
\n
"
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
" bitrate: %"
PRId64
" bps
\n
"
,
(
int64_t
)
avctx
->
bit_rate
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
" bitrate: %"
PRId64
" bps
\n
"
,
avctx
->
bit_rate
);
}
else
{
av_log
(
avctx
,
AV_LOG_DEBUG
,
"rate control: CBR
\n
"
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
" bitrate: %"
PRId64
" bps
\n
"
,
(
int64_t
)
avctx
->
bit_rate
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
" bitrate: %"
PRId64
" bps
\n
"
,
avctx
->
bit_rate
);
}
av_log
(
avctx
,
AV_LOG_DEBUG
,
"complexity: %d
\n
"
,
avctx
->
compression_level
);
...
...
libavcodec/mpegvideo_enc.c
View file @
724cf83f
...
...
@@ -506,7 +506,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
avctx
->
bit_rate
*
av_q2d
(
avctx
->
time_base
)
>
avctx
->
bit_rate_tolerance
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"bitrate tolerance %d too small for bitrate %"
PRId64
", overriding
\n
"
,
avctx
->
bit_rate_tolerance
,
(
int64_t
)
avctx
->
bit_rate
);
"bitrate tolerance %d too small for bitrate %"
PRId64
", overriding
\n
"
,
avctx
->
bit_rate_tolerance
,
avctx
->
bit_rate
);
avctx
->
bit_rate_tolerance
=
5
*
avctx
->
bit_rate
*
av_q2d
(
avctx
->
time_base
);
}
...
...
libavcodec/pcm-bluray.c
View file @
724cf83f
...
...
@@ -119,7 +119,7 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx,
ff_dlog
(
avctx
,
"pcm_bluray_parse_header: %d channels, %d bits per sample, %d Hz, %"
PRId64
" bit/s
\n
"
,
avctx
->
channels
,
avctx
->
bits_per_coded_sample
,
avctx
->
sample_rate
,
(
int64_t
)
avctx
->
bit_rate
);
avctx
->
sample_rate
,
avctx
->
bit_rate
);
return
0
;
}
...
...
libavcodec/pcm-dvd.c
View file @
724cf83f
...
...
@@ -142,7 +142,7 @@ static int pcm_dvd_parse_header(AVCodecContext *avctx, const uint8_t *header)
ff_dlog
(
avctx
,
"pcm_dvd_parse_header: %d channels, %d bits per sample, %d Hz, %"
PRId64
" bit/s
\n
"
,
avctx
->
channels
,
avctx
->
bits_per_coded_sample
,
avctx
->
sample_rate
,
(
int64_t
)
avctx
->
bit_rate
);
avctx
->
sample_rate
,
avctx
->
bit_rate
);
s
->
last_header
=
header_int
;
...
...
libavcodec/sipr.c
View file @
724cf83f
...
...
@@ -494,7 +494,7 @@ static av_cold int sipr_decoder_init(AVCodecContext * avctx)
else
ctx
->
mode
=
MODE_5k0
;
av_log
(
avctx
,
AV_LOG_WARNING
,
"Invalid block_align: %d. Mode %s guessed based on bitrate: %"
PRId64
"
\n
"
,
avctx
->
block_align
,
modes
[
ctx
->
mode
].
mode_name
,
(
int64_t
)
avctx
->
bit_rate
);
avctx
->
block_align
,
modes
[
ctx
->
mode
].
mode_name
,
avctx
->
bit_rate
);
}
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Mode: %s
\n
"
,
modes
[
ctx
->
mode
].
mode_name
);
...
...
libavcodec/utils.c
View file @
724cf83f
...
...
@@ -967,7 +967,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
if
(
(
avctx
->
codec_type
==
AVMEDIA_TYPE_VIDEO
||
avctx
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
&&
avctx
->
bit_rate
>
0
&&
avctx
->
bit_rate
<
1000
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"Bitrate %"
PRId64
" is extremely low, maybe you mean %"
PRId64
"k
\n
"
,
(
int64_t
)
avctx
->
bit_rate
,
(
int64_t
)
avctx
->
bit_rate
);
av_log
(
avctx
,
AV_LOG_WARNING
,
"Bitrate %"
PRId64
" is extremely low, maybe you mean %"
PRId64
"k
\n
"
,
avctx
->
bit_rate
,
avctx
->
bit_rate
);
}
if
(
!
avctx
->
rc_initial_buffer_occupancy
)
...
...
@@ -1522,7 +1522,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
", %"
PRId64
" kb/s"
,
bitrate
/
1000
);
}
else
if
(
enc
->
rc_max_rate
>
0
)
{
snprintf
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
", max. %"
PRId64
" kb/s"
,
(
int64_t
)
enc
->
rc_max_rate
/
1000
);
", max. %"
PRId64
" kb/s"
,
enc
->
rc_max_rate
/
1000
);
}
}
...
...
libavcodec/wma.c
View file @
724cf83f
...
...
@@ -186,7 +186,7 @@ av_cold int ff_wma_init(AVCodecContext *avctx, int flags2)
}
ff_dlog
(
s
->
avctx
,
"flags2=0x%x
\n
"
,
flags2
);
ff_dlog
(
s
->
avctx
,
"version=%d channels=%d sample_rate=%d bitrate=%"
PRId64
" block_align=%d
\n
"
,
s
->
version
,
avctx
->
channels
,
avctx
->
sample_rate
,
(
int64_t
)
avctx
->
bit_rate
,
s
->
version
,
avctx
->
channels
,
avctx
->
sample_rate
,
avctx
->
bit_rate
,
avctx
->
block_align
);
ff_dlog
(
s
->
avctx
,
"bps=%f bps1=%f high_freq=%f bitoffset=%d
\n
"
,
bps
,
bps1
,
high_freq
,
s
->
byte_offset_bits
);
...
...
libavcodec/wmaenc.c
View file @
724cf83f
...
...
@@ -53,7 +53,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
if
(
avctx
->
bit_rate
<
24
*
1000
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"bitrate too low: got %"
PRId64
", need 24000 or higher
\n
"
,
(
int64_t
)
avctx
->
bit_rate
);
avctx
->
bit_rate
);
return
AVERROR
(
EINVAL
);
}
...
...
libavdevice/fbdev_dec.c
View file @
724cf83f
...
...
@@ -140,7 +140,7 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx)
fbdev
->
width
,
fbdev
->
height
,
fbdev
->
varinfo
.
bits_per_pixel
,
av_get_pix_fmt_name
(
pix_fmt
),
fbdev
->
framerate_q
.
num
,
fbdev
->
framerate_q
.
den
,
(
int64_t
)
st
->
codecpar
->
bit_rate
);
st
->
codecpar
->
bit_rate
);
return
0
;
fail:
...
...
libavformat/sdp.c
View file @
724cf83f
...
...
@@ -748,7 +748,7 @@ void ff_sdp_write_media(char *buff, int size, AVStream *st, int idx,
av_strlcatf
(
buff
,
size
,
"m=%s %d RTP/AVP %d
\r\n
"
,
type
,
port
,
payload_type
);
sdp_write_address
(
buff
,
size
,
dest_addr
,
dest_type
,
ttl
);
if
(
p
->
bit_rate
)
{
av_strlcatf
(
buff
,
size
,
"b=AS:%"
PRId64
"
\r\n
"
,
(
int64_t
)
p
->
bit_rate
/
1000
);
av_strlcatf
(
buff
,
size
,
"b=AS:%"
PRId64
"
\r\n
"
,
p
->
bit_rate
/
1000
);
}
sdp_write_media_attributes
(
buff
,
size
,
st
,
payload_type
,
fmt
);
...
...
libavformat/smoothstreamingenc.c
View file @
724cf83f
...
...
@@ -263,7 +263,7 @@ static int write_manifest(AVFormatContext *s, int final)
if
(
s
->
streams
[
i
]
->
codecpar
->
codec_type
!=
AVMEDIA_TYPE_VIDEO
)
continue
;
last
=
i
;
avio_printf
(
out
,
"<QualityLevel Index=
\"
%d
\"
Bitrate=
\"
%"
PRId64
"
\"
FourCC=
\"
%s
\"
MaxWidth=
\"
%d
\"
MaxHeight=
\"
%d
\"
CodecPrivateData=
\"
%s
\"
/>
\n
"
,
index
,
(
int64_t
)
s
->
streams
[
i
]
->
codecpar
->
bit_rate
,
os
->
fourcc
,
s
->
streams
[
i
]
->
codecpar
->
width
,
s
->
streams
[
i
]
->
codecpar
->
height
,
os
->
private_str
);
avio_printf
(
out
,
"<QualityLevel Index=
\"
%d
\"
Bitrate=
\"
%"
PRId64
"
\"
FourCC=
\"
%s
\"
MaxWidth=
\"
%d
\"
MaxHeight=
\"
%d
\"
CodecPrivateData=
\"
%s
\"
/>
\n
"
,
index
,
s
->
streams
[
i
]
->
codecpar
->
bit_rate
,
os
->
fourcc
,
s
->
streams
[
i
]
->
codecpar
->
width
,
s
->
streams
[
i
]
->
codecpar
->
height
,
os
->
private_str
);
index
++
;
}
output_chunk_list
(
&
c
->
streams
[
last
],
out
,
final
,
c
->
lookahead_count
,
c
->
window_size
);
...
...
@@ -277,7 +277,7 @@ static int write_manifest(AVFormatContext *s, int final)
if
(
s
->
streams
[
i
]
->
codecpar
->
codec_type
!=
AVMEDIA_TYPE_AUDIO
)
continue
;
last
=
i
;
avio_printf
(
out
,
"<QualityLevel Index=
\"
%d
\"
Bitrate=
\"
%"
PRId64
"
\"
FourCC=
\"
%s
\"
SamplingRate=
\"
%d
\"
Channels=
\"
%d
\"
BitsPerSample=
\"
16
\"
PacketSize=
\"
%d
\"
AudioTag=
\"
%d
\"
CodecPrivateData=
\"
%s
\"
/>
\n
"
,
index
,
(
int64_t
)
s
->
streams
[
i
]
->
codecpar
->
bit_rate
,
os
->
fourcc
,
s
->
streams
[
i
]
->
codecpar
->
sample_rate
,
s
->
streams
[
i
]
->
codecpar
->
channels
,
os
->
packet_size
,
os
->
audio_tag
,
os
->
private_str
);
avio_printf
(
out
,
"<QualityLevel Index=
\"
%d
\"
Bitrate=
\"
%"
PRId64
"
\"
FourCC=
\"
%s
\"
SamplingRate=
\"
%d
\"
Channels=
\"
%d
\"
BitsPerSample=
\"
16
\"
PacketSize=
\"
%d
\"
AudioTag=
\"
%d
\"
CodecPrivateData=
\"
%s
\"
/>
\n
"
,
index
,
s
->
streams
[
i
]
->
codecpar
->
bit_rate
,
os
->
fourcc
,
s
->
streams
[
i
]
->
codecpar
->
sample_rate
,
s
->
streams
[
i
]
->
codecpar
->
channels
,
os
->
packet_size
,
os
->
audio_tag
,
os
->
private_str
);
index
++
;
}
output_chunk_list
(
&
c
->
streams
[
last
],
out
,
final
,
c
->
lookahead_count
,
c
->
window_size
);
...
...
@@ -324,7 +324,7 @@ static int ism_write_header(AVFormatContext *s)
ret
=
AVERROR
(
EINVAL
);
goto
fail
;
}
snprintf
(
os
->
dirname
,
sizeof
(
os
->
dirname
),
"%s/QualityLevels(%"
PRId64
")"
,
s
->
filename
,
(
int64_t
)
s
->
streams
[
i
]
->
codecpar
->
bit_rate
);
snprintf
(
os
->
dirname
,
sizeof
(
os
->
dirname
),
"%s/QualityLevels(%"
PRId64
")"
,
s
->
filename
,
s
->
streams
[
i
]
->
codecpar
->
bit_rate
);
if
(
mkdir
(
os
->
dirname
,
0777
)
==
-
1
&&
errno
!=
EEXIST
)
{
ret
=
AVERROR
(
errno
);
av_log
(
s
,
AV_LOG_ERROR
,
"mkdir failed
\n
"
);
...
...
libavformat/vqf.c
View file @
724cf83f
...
...
@@ -212,7 +212,7 @@ static int vqf_read_header(AVFormatContext *s)
break
;
default:
av_log
(
s
,
AV_LOG_ERROR
,
"Mode not supported: %d Hz, %"
PRId64
" kb/s.
\n
"
,
st
->
codecpar
->
sample_rate
,
(
int64_t
)
st
->
codecpar
->
bit_rate
);
st
->
codecpar
->
sample_rate
,
st
->
codecpar
->
bit_rate
);
return
-
1
;
}
c
->
frame_bit_len
=
st
->
codecpar
->
bit_rate
*
size
/
st
->
codecpar
->
sample_rate
;
...
...
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