You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/movenc: remove useless if and reindent
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@@ -5733,11 +5733,9 @@ static int mov_write_trailer(AVFormatContext *s)
|
|||||||
res = shift_data(s);
|
res = shift_data(s);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
goto error;
|
goto error;
|
||||||
if (res == 0) {
|
|
||||||
avio_seek(pb, mov->reserved_header_pos, SEEK_SET);
|
avio_seek(pb, mov->reserved_header_pos, SEEK_SET);
|
||||||
if ((res = mov_write_moov_tag(pb, mov, s)) < 0)
|
if ((res = mov_write_moov_tag(pb, mov, s)) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
} else if (mov->reserved_moov_size > 0) {
|
} else if (mov->reserved_moov_size > 0) {
|
||||||
int64_t size;
|
int64_t size;
|
||||||
if ((res = mov_write_moov_tag(pb, mov, s)) < 0)
|
if ((res = mov_write_moov_tag(pb, mov, s)) < 0)
|
||||||
@@ -5762,17 +5760,16 @@ static int mov_write_trailer(AVFormatContext *s)
|
|||||||
for (i = 0; i < mov->nb_streams; i++)
|
for (i = 0; i < mov->nb_streams; i++)
|
||||||
mov->tracks[i].data_offset = 0;
|
mov->tracks[i].data_offset = 0;
|
||||||
if (mov->flags & FF_MOV_FLAG_GLOBAL_SIDX) {
|
if (mov->flags & FF_MOV_FLAG_GLOBAL_SIDX) {
|
||||||
|
int64_t end;
|
||||||
av_log(s, AV_LOG_INFO, "Starting second pass: inserting sidx atoms\n");
|
av_log(s, AV_LOG_INFO, "Starting second pass: inserting sidx atoms\n");
|
||||||
res = shift_data(s);
|
res = shift_data(s);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
goto error;
|
goto error;
|
||||||
if (res == 0) {
|
end = avio_tell(pb);
|
||||||
int64_t end = avio_tell(pb);
|
|
||||||
avio_seek(pb, mov->reserved_header_pos, SEEK_SET);
|
avio_seek(pb, mov->reserved_header_pos, SEEK_SET);
|
||||||
mov_write_sidx_tags(pb, mov, -1, 0);
|
mov_write_sidx_tags(pb, mov, -1, 0);
|
||||||
avio_seek(pb, end, SEEK_SET);
|
avio_seek(pb, end, SEEK_SET);
|
||||||
mov_write_mfra_tag(pb, mov);
|
mov_write_mfra_tag(pb, mov);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
mov_write_mfra_tag(pb, mov);
|
mov_write_mfra_tag(pb, mov);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user