avformat/flac_picture: Reindentation
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
e304f5f758
commit
0871273a2f
@ -150,19 +150,18 @@ int ff_flac_parse_picture(AVFormatContext *s, uint8_t **bufp, int buf_size,
|
|||||||
data->data += bytestream2_tell(&g);
|
data->data += bytestream2_tell(&g);
|
||||||
data->size = len + AV_INPUT_BUFFER_PADDING_SIZE;
|
data->size = len + AV_INPUT_BUFFER_PADDING_SIZE;
|
||||||
} else {
|
} else {
|
||||||
if (!(data = av_buffer_alloc(len + AV_INPUT_BUFFER_PADDING_SIZE))) {
|
if (!(data = av_buffer_alloc(len + AV_INPUT_BUFFER_PADDING_SIZE)))
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
|
||||||
|
|
||||||
if (trunclen == 0) {
|
if (trunclen == 0) {
|
||||||
bytestream2_get_bufferu(&g, data->data, len);
|
bytestream2_get_bufferu(&g, data->data, len);
|
||||||
} else {
|
} else {
|
||||||
// If truncation was detected copy all data from block and read missing bytes
|
// If truncation was detected copy all data from block and
|
||||||
// not included in the block size
|
// read missing bytes not included in the block size.
|
||||||
bytestream2_get_bufferu(&g, data->data, left);
|
bytestream2_get_bufferu(&g, data->data, left);
|
||||||
if (avio_read(s->pb, data->data + len - trunclen, trunclen) < trunclen)
|
if (avio_read(s->pb, data->data + len - trunclen, trunclen) < trunclen)
|
||||||
RETURN_ERROR(AVERROR_INVALIDDATA);
|
RETURN_ERROR(AVERROR_INVALIDDATA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
memset(data->data + len, 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
memset(data->data + len, 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user