summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2013-04-01 21:10:25 +0200
committerMarton Balint <cus@passwd.hu>2013-04-08 22:21:45 +0200
commit5dacf7b1ab40276c4d56b86081cbad7552a85f70 (patch)
tree515eb9fafe2a7e243f26e83c59e4957a2d613844 /ffplay.c
parent0b24e341ed75573d1abfe13dec6fb4b8a37e94d3 (diff)
ffplay: fix indentation
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c49
1 files changed, 24 insertions, 25 deletions
diff --git a/ffplay.c b/ffplay.c
index fc8bc4e82d..dd530b6a24 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2175,34 +2175,33 @@ static int audio_decode_frame(VideoState *is)
return -1;
if (!is->audio_buf_frames_pending) {
+ if (flush_complete)
+ break;
+ new_packet = 0;
+ len1 = avcodec_decode_audio4(dec, is->frame, &got_frame, pkt_temp);
+ if (len1 < 0) {
+ /* if error, we skip the frame */
+ pkt_temp->size = 0;
+ break;
+ }
- if (flush_complete)
- break;
- new_packet = 0;
- len1 = avcodec_decode_audio4(dec, is->frame, &got_frame, pkt_temp);
- if (len1 < 0) {
- /* if error, we skip the frame */
- pkt_temp->size = 0;
- break;
- }
-
- pkt_temp->data += len1;
- pkt_temp->size -= len1;
+ pkt_temp->data += len1;
+ pkt_temp->size -= len1;
- if (!got_frame) {
- /* stop sending empty packets if the decoder is finished */
- if (!pkt_temp->data && dec->codec->capabilities & CODEC_CAP_DELAY)
- flush_complete = 1;
- continue;
- }
+ if (!got_frame) {
+ /* stop sending empty packets if the decoder is finished */
+ if (!pkt_temp->data && dec->codec->capabilities & CODEC_CAP_DELAY)
+ flush_complete = 1;
+ continue;
+ }
- tb = (AVRational){1, is->frame->sample_rate};
- if (is->frame->pts != AV_NOPTS_VALUE)
- is->frame->pts = av_rescale_q(is->frame->pts, dec->time_base, tb);
- if (is->frame->pts == AV_NOPTS_VALUE && pkt_temp->pts != AV_NOPTS_VALUE)
- is->frame->pts = av_rescale_q(pkt_temp->pts, is->audio_st->time_base, tb);
- if (pkt_temp->pts != AV_NOPTS_VALUE)
- pkt_temp->pts += (double) is->frame->nb_samples / is->frame->sample_rate / av_q2d(is->audio_st->time_base);
+ tb = (AVRational){1, is->frame->sample_rate};
+ if (is->frame->pts != AV_NOPTS_VALUE)
+ is->frame->pts = av_rescale_q(is->frame->pts, dec->time_base, tb);
+ if (is->frame->pts == AV_NOPTS_VALUE && pkt_temp->pts != AV_NOPTS_VALUE)
+ is->frame->pts = av_rescale_q(pkt_temp->pts, is->audio_st->time_base, tb);
+ if (pkt_temp->pts != AV_NOPTS_VALUE)
+ pkt_temp->pts += (double) is->frame->nb_samples / is->frame->sample_rate / av_q2d(is->audio_st->time_base);
#if CONFIG_AVFILTER
dec_channel_layout = get_valid_channel_layout(is->frame->channel_layout, av_frame_get_channels(is->frame));