[FFmpeg-devel] [PATCH] ffplay: move assignment in else block in audio_decode_frame()
Marton Balint
cus at passwd.hu
Fri Jun 29 21:23:47 CEST 2012
On Fri, 29 Jun 2012, Stefano Sabatini wrote:
> Avoid confusing and pointless double assignment of variable
> resampled_data_size.
> ---
> ffplay.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
LGTM, thanks.
>
> diff --git a/ffplay.c b/ffplay.c
> index 7e857a0..fdd281b 100644
> --- a/ffplay.c
> +++ b/ffplay.c
> @@ -1993,7 +1993,6 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
> is->audio_src.fmt = dec->sample_fmt;
> }
>
> - resampled_data_size = data_size;
> if (is->swr_ctx) {
> const uint8_t *in[] = { is->frame->data[0] };
> uint8_t *out[] = {is->audio_buf2};
> @@ -2018,6 +2017,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);
> } else {
> is->audio_buf = is->frame->data[0];
> + resampled_data_size = data_size;
> }
>
> /* if no pts, then compute it */
> --
> 1.7.5.4
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list