Commit 1d54309c authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Paul B Mahol

avcodec/flac_parser: Cosmetics

Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent 5873feac
...@@ -113,8 +113,8 @@ static int frame_header_is_valid(AVCodecContext *avctx, const uint8_t *buf, ...@@ -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 * This function is based on av_fifo_generic_read, which is why there is a comment
* about a memory barrier for SMP. * about a memory barrier for SMP.
*/ */
static uint8_t* flac_fifo_read_wrap(FLACParseContext *fpc, int offset, int len, static uint8_t *flac_fifo_read_wrap(FLACParseContext *fpc, int offset, int len,
uint8_t** wrap_buf, int* allocated_size) uint8_t **wrap_buf, int *allocated_size)
{ {
AVFifoBuffer *f = fpc->fifo_buf; AVFifoBuffer *f = fpc->fifo_buf;
uint8_t *start = f->rptr + offset; uint8_t *start = f->rptr + offset;
...@@ -153,7 +153,7 @@ static uint8_t* flac_fifo_read_wrap(FLACParseContext *fpc, int offset, int len, ...@@ -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 * 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. * 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; AVFifoBuffer *f = fpc->fifo_buf;
uint8_t *start = f->rptr + offset; uint8_t *start = f->rptr + offset;
...@@ -201,9 +201,8 @@ static int find_headers_search_validate(FLACParseContext *fpc, int offset) ...@@ -201,9 +201,8 @@ static int find_headers_search_validate(FLACParseContext *fpc, int offset)
return size; return size;
} }
static int find_headers_search(FLACParseContext *fpc, uint8_t *buf, int buf_size, static int find_headers_search(FLACParseContext *fpc, uint8_t *buf,
int search_start) int buf_size, int search_start)
{ {
int size = 0, mod_offset = (buf_size - 1) % 4, i, j; int size = 0, mod_offset = (buf_size - 1) % 4, i, j;
uint32_t x; uint32_t x;
...@@ -464,7 +463,7 @@ static void score_sequences(FLACParseContext *fpc) ...@@ -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) int *poutbuf_size)
{ {
FLACHeaderMarker *header = fpc->best_header; FLACHeaderMarker *header = fpc->best_header;
...@@ -490,7 +489,7 @@ static int get_best_header(FLACParseContext* fpc, const uint8_t **poutbuf, ...@@ -490,7 +489,7 @@ static int get_best_header(FLACParseContext* fpc, const uint8_t **poutbuf,
&fpc->wrap_buf_allocated_size); &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) if (header->fi.is_var_size)
fpc->pc->pts = header->fi.frame_or_sample_num; fpc->pc->pts = header->fi.frame_or_sample_num;
else if (header->best_child) else if (header->best_child)
...@@ -524,7 +523,7 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx, ...@@ -524,7 +523,7 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx,
s->duration = fi.blocksize; s->duration = fi.blocksize;
if (!avctx->sample_rate) if (!avctx->sample_rate)
avctx->sample_rate = fi.samplerate; 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; fpc->pc->pts = fi.frame_or_sample_num;
if (!fi.is_var_size) if (!fi.is_var_size)
fpc->pc->pts *= fi.blocksize; fpc->pc->pts *= fi.blocksize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment