This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 2d5556b082b93d6d29de944b46b82dc3fed90d69 Author: James Almer <[email protected]> AuthorDate: Sun Jan 25 23:47:05 2026 -0300 Commit: James Almer <[email protected]> CommitDate: Thu Jan 29 21:09:03 2026 -0300 avformat/cafenc: reindent after the previous changes Signed-off-by: James Almer <[email protected]> --- libavformat/cafenc.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c index 6f44e2a2b0..ada03836bc 100644 --- a/libavformat/cafenc.c +++ b/libavformat/cafenc.c @@ -240,16 +240,16 @@ static int caf_write_packet(AVFormatContext *s, AVPacket *pkt) unsigned alloc_size = caf->packets + 1; if (!st->codecpar->block_align) { - if (UINT_MAX / sizeof(*caf_st->byte_size_buffer) < alloc_size) - return AVERROR(ERANGE); - - pkt_sizes = av_fast_realloc(caf_st->byte_size_buffer, - &caf_st->byte_size_buffer_sz, - alloc_size * sizeof(*caf_st->byte_size_buffer)); - if (!pkt_sizes) - return AVERROR(ENOMEM); - caf_st->byte_size_buffer = pkt_sizes; - caf_st->byte_size_buffer[caf->packets] = pkt->size; + if (UINT_MAX / sizeof(*caf_st->byte_size_buffer) < alloc_size) + return AVERROR(ERANGE); + + pkt_sizes = av_fast_realloc(caf_st->byte_size_buffer, + &caf_st->byte_size_buffer_sz, + alloc_size * sizeof(*caf_st->byte_size_buffer)); + if (!pkt_sizes) + return AVERROR(ENOMEM); + caf_st->byte_size_buffer = pkt_sizes; + caf_st->byte_size_buffer[caf->packets] = pkt->size; } if (!caf->frame_size) { if (UINT_MAX / sizeof(*caf_st->frame_size_buffer) < alloc_size) @@ -264,8 +264,8 @@ static int caf_write_packet(AVFormatContext *s, AVPacket *pkt) caf_st->frame_size_buffer[caf->packets] = pkt->duration; } } - caf->packets++; - caf->total_duration += pkt->duration; + caf->packets++; + caf->total_duration += pkt->duration; avio_write(s->pb, pkt->data, pkt->size); return 0; @@ -282,9 +282,9 @@ static int caf_write_trailer(AVFormatContext *s) if (pb->seekable & AVIO_SEEKABLE_NORMAL) { int64_t file_size = avio_tell(pb); int64_t packets = (!par->block_align || !caf->frame_size) ? caf->packets : 0; - int64_t valid_frames = caf->frame_size ? caf->packets * caf->frame_size : caf->total_duration; - unsigned remainder_frames = valid_frames > caf->total_duration - ? valid_frames - caf->total_duration : 0; + int64_t valid_frames = caf->frame_size ? caf->packets * caf->frame_size : caf->total_duration; + unsigned remainder_frames = valid_frames > caf->total_duration + ? valid_frames - caf->total_duration : 0; avio_seek(pb, caf->data, SEEK_SET); avio_wb64(pb, file_size - caf->data - 8); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
