summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-04-26 12:39:35 +0200
committerAnton Khirnov <anton@khirnov.net>2023-05-15 10:57:19 +0200
commit0d25b404d43cacfa6244f391da49ead9ff97bedf (patch)
tree6c71e95d69c76aabdde2742198273c7d15fa03d0
parent702ff2d281412a4652d06dd2f54e4ad079c615b6 (diff)
downloadffmpeg-0d25b404d43cacfa6244f391da49ead9ff97bedf.tar.gz
fftools/ffmpeg: reindent after previous commit
-rw-r--r--fftools/ffmpeg.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 2bd3ce3f13..817b643c48 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1870,36 +1870,36 @@ static void ist_dts_update(InputStream *ist, AVPacket *pkt)
if (pkt->dts != AV_NOPTS_VALUE)
ist->next_dts = ist->dts = av_rescale_q(pkt->dts, pkt->time_base, AV_TIME_BASE_Q);
- ist->dts = ist->next_dts;
- switch (par->codec_type) {
- case AVMEDIA_TYPE_AUDIO:
- av_assert1(pkt->duration >= 0);
- if (par->sample_rate) {
- ist->next_dts += ((int64_t)AV_TIME_BASE * par->frame_size) /
- par->sample_rate;
- } else {
- ist->next_dts += av_rescale_q(pkt->duration, pkt->time_base, AV_TIME_BASE_Q);
- }
- break;
- case AVMEDIA_TYPE_VIDEO:
- if (ist->framerate.num) {
- // TODO: Remove work-around for c99-to-c89 issue 7
- AVRational time_base_q = AV_TIME_BASE_Q;
- int64_t next_dts = av_rescale_q(ist->next_dts, time_base_q, av_inv_q(ist->framerate));
- ist->next_dts = av_rescale_q(next_dts + 1, av_inv_q(ist->framerate), time_base_q);
- } else if (pkt->duration) {
- ist->next_dts += av_rescale_q(pkt->duration, pkt->time_base, AV_TIME_BASE_Q);
- } else if(ist->dec_ctx->framerate.num != 0) {
- int fields = (ist->codec_desc &&
- (ist->codec_desc->props & AV_CODEC_PROP_FIELDS)) ?
- ist->last_pkt_repeat_pict + 1 : 2;
- AVRational field_rate = av_mul_q(ist->dec_ctx->framerate,
- (AVRational){ 2, 1 });
-
- ist->next_dts += av_rescale_q(fields, av_inv_q(field_rate), AV_TIME_BASE_Q);
- }
- break;
+ ist->dts = ist->next_dts;
+ switch (par->codec_type) {
+ case AVMEDIA_TYPE_AUDIO:
+ av_assert1(pkt->duration >= 0);
+ if (par->sample_rate) {
+ ist->next_dts += ((int64_t)AV_TIME_BASE * par->frame_size) /
+ par->sample_rate;
+ } else {
+ ist->next_dts += av_rescale_q(pkt->duration, pkt->time_base, AV_TIME_BASE_Q);
}
+ break;
+ case AVMEDIA_TYPE_VIDEO:
+ if (ist->framerate.num) {
+ // TODO: Remove work-around for c99-to-c89 issue 7
+ AVRational time_base_q = AV_TIME_BASE_Q;
+ int64_t next_dts = av_rescale_q(ist->next_dts, time_base_q, av_inv_q(ist->framerate));
+ ist->next_dts = av_rescale_q(next_dts + 1, av_inv_q(ist->framerate), time_base_q);
+ } else if (pkt->duration) {
+ ist->next_dts += av_rescale_q(pkt->duration, pkt->time_base, AV_TIME_BASE_Q);
+ } else if(ist->dec_ctx->framerate.num != 0) {
+ int fields = (ist->codec_desc &&
+ (ist->codec_desc->props & AV_CODEC_PROP_FIELDS)) ?
+ ist->last_pkt_repeat_pict + 1 : 2;
+ AVRational field_rate = av_mul_q(ist->dec_ctx->framerate,
+ (AVRational){ 2, 1 });
+
+ ist->next_dts += av_rescale_q(fields, av_inv_q(field_rate), AV_TIME_BASE_Q);
+ }
+ break;
+ }
}
/*