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
4ec33648
Commit
4ec33648
authored
Feb 25, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parser: cosmetics: Drop some unnecessary parentheses
parent
e7dfaf16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
parser.c
libavcodec/parser.c
+8
-8
No files found.
libavcodec/parser.c
View file @
4ec33648
...
@@ -176,8 +176,8 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx,
...
@@ -176,8 +176,8 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx,
const
uint8_t
*
buf
,
int
buf_size
,
int
keyframe
)
const
uint8_t
*
buf
,
int
buf_size
,
int
keyframe
)
{
{
if
(
s
&&
s
->
parser
->
split
)
{
if
(
s
&&
s
->
parser
->
split
)
{
if
(
(
avctx
->
flags
&
CODEC_FLAG_GLOBAL_HEADER
)
||
if
(
avctx
->
flags
&
CODEC_FLAG_GLOBAL_HEADER
||
(
avctx
->
flags2
&
CODEC_FLAG2_LOCAL_HEADER
)
)
{
avctx
->
flags2
&
CODEC_FLAG2_LOCAL_HEADER
)
{
int
i
=
s
->
parser
->
split
(
avctx
,
buf
,
buf_size
);
int
i
=
s
->
parser
->
split
(
avctx
,
buf
,
buf_size
);
buf
+=
i
;
buf
+=
i
;
buf_size
-=
i
;
buf_size
-=
i
;
...
@@ -188,14 +188,14 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx,
...
@@ -188,14 +188,14 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx,
*
poutbuf
=
(
uint8_t
*
)
buf
;
*
poutbuf
=
(
uint8_t
*
)
buf
;
*
poutbuf_size
=
buf_size
;
*
poutbuf_size
=
buf_size
;
if
(
avctx
->
extradata
)
{
if
(
avctx
->
extradata
)
{
if
(
(
keyframe
&&
(
avctx
->
flags2
&
CODEC_FLAG2_LOCAL_HEADER
)
))
{
if
(
keyframe
&&
(
avctx
->
flags2
&
CODEC_FLAG2_LOCAL_HEADER
))
{
int
size
=
buf_size
+
avctx
->
extradata_size
;
int
size
=
buf_size
+
avctx
->
extradata_size
;
*
poutbuf_size
=
size
;
*
poutbuf_size
=
size
;
*
poutbuf
=
av_malloc
(
size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
*
poutbuf
=
av_malloc
(
size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
memcpy
(
*
poutbuf
,
avctx
->
extradata
,
avctx
->
extradata_size
);
memcpy
(
*
poutbuf
,
avctx
->
extradata
,
avctx
->
extradata_size
);
memcpy
(
(
*
poutbuf
)
+
avctx
->
extradata_size
,
buf
,
memcpy
(
*
poutbuf
+
avctx
->
extradata_size
,
buf
,
buf_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
buf_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
return
1
;
return
1
;
}
}
...
@@ -237,7 +237,7 @@ int ff_combine_frame(ParseContext *pc, int next,
...
@@ -237,7 +237,7 @@ int ff_combine_frame(ParseContext *pc, int next,
/* copy into buffer end return */
/* copy into buffer end return */
if
(
next
==
END_NOT_FOUND
)
{
if
(
next
==
END_NOT_FOUND
)
{
void
*
new_buffer
=
av_fast_realloc
(
pc
->
buffer
,
&
pc
->
buffer_size
,
void
*
new_buffer
=
av_fast_realloc
(
pc
->
buffer
,
&
pc
->
buffer_size
,
(
*
buf_size
)
+
pc
->
index
+
*
buf_size
+
pc
->
index
+
FF_INPUT_BUFFER_PADDING_SIZE
);
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
new_buffer
)
if
(
!
new_buffer
)
...
@@ -269,8 +269,8 @@ int ff_combine_frame(ParseContext *pc, int next,
...
@@ -269,8 +269,8 @@ int ff_combine_frame(ParseContext *pc, int next,
/* store overread bytes */
/* store overread bytes */
for
(;
next
<
0
;
next
++
)
{
for
(;
next
<
0
;
next
++
)
{
pc
->
state
=
(
pc
->
state
<<
8
)
|
pc
->
buffer
[
pc
->
last_index
+
next
];
pc
->
state
=
pc
->
state
<<
8
|
pc
->
buffer
[
pc
->
last_index
+
next
];
pc
->
state64
=
(
pc
->
state64
<<
8
)
|
pc
->
buffer
[
pc
->
last_index
+
next
];
pc
->
state64
=
pc
->
state64
<<
8
|
pc
->
buffer
[
pc
->
last_index
+
next
];
pc
->
overread
++
;
pc
->
overread
++
;
}
}
...
@@ -297,7 +297,7 @@ int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
...
@@ -297,7 +297,7 @@ int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
uint32_t
state
=
-
1
;
uint32_t
state
=
-
1
;
for
(
i
=
0
;
i
<
buf_size
;
i
++
)
{
for
(
i
=
0
;
i
<
buf_size
;
i
++
)
{
state
=
(
state
<<
8
)
|
buf
[
i
];
state
=
state
<<
8
|
buf
[
i
];
if
(
state
==
0x1B3
||
state
==
0x1B6
)
if
(
state
==
0x1B3
||
state
==
0x1B6
)
return
i
-
3
;
return
i
-
3
;
}
}
...
...
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