[FFmpeg-cvslog] avformat/matroskaenc: Cosmetics
Andreas Rheinhardt
git at videolan.org
Sun Jan 26 17:52:37 EET 2020
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Jan 23 17:08:28 2020 +0100| [e4749a44979e8d403021d265623e9233fee0dae4] | committer: James Almer
avformat/matroskaenc: Cosmetics
Add {, } in situations like
if ()
...
else if ()
/* Comment */
...
else ...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e4749a44979e8d403021d265623e9233fee0dae4
---
libavformat/matroskaenc.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index a72bcb0ba1..20bad95262 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -2103,16 +2103,17 @@ static int mkv_write_block(AVFormatContext *s, AVIOContext *pb,
"at offset %" PRId64 ". TrackNumber %d, keyframe %d\n",
pkt->size, pkt->pts, pkt->dts, pkt->duration, avio_tell(pb),
mkv->cluster_pos, track_number, keyframe != 0);
+
if (par->codec_id == AV_CODEC_ID_H264 && par->extradata_size > 0 &&
- (AV_RB24(par->extradata) == 1 || AV_RB32(par->extradata) == 1))
+ (AV_RB24(par->extradata) == 1 || AV_RB32(par->extradata) == 1)) {
err = ff_avc_parse_nal_units_buf(pkt->data, &data, &size);
- else if (par->codec_id == AV_CODEC_ID_HEVC && par->extradata_size > 6 &&
- (AV_RB24(par->extradata) == 1 || AV_RB32(par->extradata) == 1))
+ } else if (par->codec_id == AV_CODEC_ID_HEVC && par->extradata_size > 6 &&
+ (AV_RB24(par->extradata) == 1 || AV_RB32(par->extradata) == 1)) {
/* extradata is Annex B, assume the bitstream is too and convert it */
err = ff_hevc_annexb2mp4_buf(pkt->data, &data, &size, 0, NULL);
- else if (par->codec_id == AV_CODEC_ID_AV1)
+ } else if (par->codec_id == AV_CODEC_ID_AV1) {
err = ff_av1_filter_obus_buf(pkt->data, &data, &size);
- else if (par->codec_id == AV_CODEC_ID_WAVPACK) {
+ } else if (par->codec_id == AV_CODEC_ID_WAVPACK) {
err = mkv_strip_wavpack(pkt->data, &data, &size);
} else
data = pkt->data;
@@ -2133,7 +2134,6 @@ static int mkv_write_block(AVFormatContext *s, AVIOContext *pb,
side_data = av_packet_get_side_data(pkt,
AV_PKT_DATA_SKIP_SAMPLES,
&side_data_size);
-
if (side_data && side_data_size >= 10) {
discard_padding = av_rescale_q(AV_RL32(side_data + 4),
(AVRational){1, par->sample_rate},
More information about the ffmpeg-cvslog
mailing list