Skip to content

Commit 59cd9f3

Browse files
restyled-commitsraveendra-karu
authored andcommitted
Restyled by clang-format
1 parent bbfdd01 commit 59cd9f3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/camera-app/linux/src/pushav-clip-recorder.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ void PushAVClipRecorder::AddStreamToOutput(AVMediaType type)
182182
mVideoStream->codecpar->width = 320;
183183
mVideoStream->codecpar->height = 240;
184184

185-
mVideoStream->avg_frame_rate = (AVRational) { 15, 1 };
185+
mVideoStream->avg_frame_rate = (AVRational){ 15, 1 };
186186
}
187187
else if (type == AVMEDIA_TYPE_AUDIO)
188188
{
@@ -194,7 +194,7 @@ void PushAVClipRecorder::AddStreamToOutput(AVMediaType type)
194194
// audio_enc_ctx->channels = 2;
195195
audio_enc_ctx->bit_rate = 20000;
196196
audio_enc_ctx->sample_fmt = audio_codec->sample_fmts[0];
197-
audio_enc_ctx->time_base = (AVRational) { 1, 48000 };
197+
audio_enc_ctx->time_base = (AVRational){ 1, 48000 };
198198
avcodec_open2(audio_enc_ctx, audio_codec, nullptr);
199199
avcodec_parameters_from_context(mAudioStream->codecpar, audio_enc_ctx);
200200
if (mFmtCtx->oformat->flags & AVFMT_GLOBALHEADER)
@@ -263,12 +263,12 @@ bool PushAVClipRecorder::ProcessBuffersAndWrite()
263263
{
264264
AVInputFormat * ifmt = av_find_input_format("h264");
265265
int ret = avformat_open_input(&mInFmtCtx, "", ifmt, nullptr);
266-
if(ret != 0)
266+
if (ret != 0)
267267
{
268268
ChipLogError(Camera, "Failed to open input stream for video");
269269
return ret;
270270
}
271-
ret = avformat_find_stream_info(mInFmtCtx, nullptr);
271+
ret = avformat_find_stream_info(mInFmtCtx, nullptr);
272272
}
273273
SetupOutput(mOutputPrefix, mInitSegName, mMediaSegName, useVideo);
274274
if (!mFmtCtx)
@@ -277,8 +277,8 @@ bool PushAVClipRecorder::ProcessBuffersAndWrite()
277277
}
278278

279279
AVStream * out_stream = useVideo ? mVideoStream : mAudioStream;
280-
AVRational inputTb = (AVRational) { 1, 1000000 };
281-
AVRational outputTb = useVideo ? (AVRational) { 1, 90000 } : (AVRational) { 1, 48000 };
280+
AVRational inputTb = (AVRational){ 1, 1000000 };
281+
AVRational outputTb = useVideo ? (AVRational){ 1, 90000 } : (AVRational){ 1, 48000 };
282282
int64_t currentPts = AV_NOPTS_VALUE;
283283

284284
if (pkt->pts != AV_NOPTS_VALUE)

0 commit comments

Comments
 (0)