mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
ffplay: move assignment in else block in audio_decode_frame()
Avoid confusing and pointless double assignment of variable resampled_data_size.
This commit is contained in:
parent
0d3ffde64f
commit
347ecfdc63
2
ffplay.c
2
ffplay.c
@ -1986,7 +1986,6 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
|
|||||||
is->audio_src.fmt = dec->sample_fmt;
|
is->audio_src.fmt = dec->sample_fmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
resampled_data_size = data_size;
|
|
||||||
if (is->swr_ctx) {
|
if (is->swr_ctx) {
|
||||||
const uint8_t *in[] = { is->frame->data[0] };
|
const uint8_t *in[] = { is->frame->data[0] };
|
||||||
uint8_t *out[] = {is->audio_buf2};
|
uint8_t *out[] = {is->audio_buf2};
|
||||||
@ -2011,6 +2010,7 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
|
|||||||
resampled_data_size = len2 * is->audio_tgt.channels * av_get_bytes_per_sample(is->audio_tgt.fmt);
|
resampled_data_size = len2 * is->audio_tgt.channels * av_get_bytes_per_sample(is->audio_tgt.fmt);
|
||||||
} else {
|
} else {
|
||||||
is->audio_buf = is->frame->data[0];
|
is->audio_buf = is->frame->data[0];
|
||||||
|
resampled_data_size = data_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if no pts, then compute it */
|
/* if no pts, then compute it */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user