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
1d54309c
Commit
1d54309c
authored
Oct 06, 2019
by
Andreas Rheinhardt
Committed by
Paul B Mahol
Oct 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/flac_parser: Cosmetics
Signed-off-by:
Andreas Rheinhardt
<
andreas.rheinhardt@gmail.com
>
parent
5873feac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
flac_parser.c
libavcodec/flac_parser.c
+17
-18
No files found.
libavcodec/flac_parser.c
View file @
1d54309c
...
...
@@ -113,8 +113,8 @@ static int frame_header_is_valid(AVCodecContext *avctx, const uint8_t *buf,
* This function is based on av_fifo_generic_read, which is why there is a comment
* about a memory barrier for SMP.
*/
static
uint8_t
*
flac_fifo_read_wrap
(
FLACParseContext
*
fpc
,
int
offset
,
int
len
,
uint8_t
**
wrap_buf
,
int
*
allocated_size
)
static
uint8_t
*
flac_fifo_read_wrap
(
FLACParseContext
*
fpc
,
int
offset
,
int
len
,
uint8_t
**
wrap_buf
,
int
*
allocated_size
)
{
AVFifoBuffer
*
f
=
fpc
->
fifo_buf
;
uint8_t
*
start
=
f
->
rptr
+
offset
;
...
...
@@ -153,7 +153,7 @@ static uint8_t* flac_fifo_read_wrap(FLACParseContext *fpc, int offset, int len,
* A second call to flac_fifo_read (with new offset and len) should be called
* to get the post-wrap buf if the returned len is less than the requested.
**/
static
uint8_t
*
flac_fifo_read
(
FLACParseContext
*
fpc
,
int
offset
,
int
*
len
)
static
uint8_t
*
flac_fifo_read
(
FLACParseContext
*
fpc
,
int
offset
,
int
*
len
)
{
AVFifoBuffer
*
f
=
fpc
->
fifo_buf
;
uint8_t
*
start
=
f
->
rptr
+
offset
;
...
...
@@ -201,9 +201,8 @@ static int find_headers_search_validate(FLACParseContext *fpc, int offset)
return
size
;
}
static
int
find_headers_search
(
FLACParseContext
*
fpc
,
uint8_t
*
buf
,
int
buf_size
,
int
search_start
)
static
int
find_headers_search
(
FLACParseContext
*
fpc
,
uint8_t
*
buf
,
int
buf_size
,
int
search_start
)
{
int
size
=
0
,
mod_offset
=
(
buf_size
-
1
)
%
4
,
i
,
j
;
uint32_t
x
;
...
...
@@ -464,7 +463,7 @@ static void score_sequences(FLACParseContext *fpc)
}
}
static
int
get_best_header
(
FLACParseContext
*
fpc
,
const
uint8_t
**
poutbuf
,
static
int
get_best_header
(
FLACParseContext
*
fpc
,
const
uint8_t
**
poutbuf
,
int
*
poutbuf_size
)
{
FLACHeaderMarker
*
header
=
fpc
->
best_header
;
...
...
@@ -490,7 +489,7 @@ static int get_best_header(FLACParseContext* fpc, const uint8_t **poutbuf,
&
fpc
->
wrap_buf_allocated_size
);
if
(
fpc
->
pc
->
flags
&
PARSER_FLAG_USE_CODEC_TS
){
if
(
fpc
->
pc
->
flags
&
PARSER_FLAG_USE_CODEC_TS
)
{
if
(
header
->
fi
.
is_var_size
)
fpc
->
pc
->
pts
=
header
->
fi
.
frame_or_sample_num
;
else
if
(
header
->
best_child
)
...
...
@@ -524,7 +523,7 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx,
s
->
duration
=
fi
.
blocksize
;
if
(
!
avctx
->
sample_rate
)
avctx
->
sample_rate
=
fi
.
samplerate
;
if
(
fpc
->
pc
->
flags
&
PARSER_FLAG_USE_CODEC_TS
){
if
(
fpc
->
pc
->
flags
&
PARSER_FLAG_USE_CODEC_TS
)
{
fpc
->
pc
->
pts
=
fi
.
frame_or_sample_num
;
if
(
!
fi
.
is_var_size
)
fpc
->
pc
->
pts
*=
fi
.
blocksize
;
...
...
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