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
2de887e4
Commit
2de887e4
authored
Feb 17, 2015
by
Derek Buitenhuis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libx265: Reduce the scope of some variables
Signed-off-by:
Derek Buitenhuis
<
derek.buitenhuis@gmail.com
>
parent
195942ed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
libx265.c
libavcodec/libx265.c
+6
-4
No files found.
libavcodec/libx265.c
View file @
2de887e4
...
...
@@ -76,10 +76,6 @@ static av_cold int libx265_encode_close(AVCodecContext *avctx)
static
av_cold
int
libx265_encode_init
(
AVCodecContext
*
avctx
)
{
libx265Context
*
ctx
=
avctx
->
priv_data
;
x265_nal
*
nal
;
char
sar
[
12
];
int
sar_num
,
sar_den
;
int
nnal
;
if
(
avctx
->
strict_std_compliance
>
FF_COMPLIANCE_EXPERIMENTAL
&&
!
av_pix_fmt_desc_get
(
avctx
->
pix_fmt
)
->
log2_chroma_w
)
{
...
...
@@ -114,6 +110,9 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
ctx
->
params
->
bEnablePsnr
=
!!
(
avctx
->
flags
&
CODEC_FLAG_PSNR
);
if
(
avctx
->
sample_aspect_ratio
.
num
>
0
&&
avctx
->
sample_aspect_ratio
.
den
>
0
)
{
char
sar
[
12
];
int
sar_num
,
sar_den
;
av_reduce
(
&
sar_num
,
&
sar_den
,
avctx
->
sample_aspect_ratio
.
num
,
avctx
->
sample_aspect_ratio
.
den
,
65535
);
...
...
@@ -180,6 +179,9 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
}
if
(
avctx
->
flags
&
CODEC_FLAG_GLOBAL_HEADER
)
{
x265_nal
*
nal
;
int
nnal
;
avctx
->
extradata_size
=
x265_encoder_headers
(
ctx
->
encoder
,
&
nal
,
&
nnal
);
if
(
avctx
->
extradata_size
<=
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Cannot encode headers.
\n
"
);
...
...
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