mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/flac_parser: Cosmetics
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
5873feac54
commit
1d54309c8a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue