[FFmpeg-cvslog] ffplay: move assignment in else block in audio_decode_frame()

Stefano Sabatini git at videolan.org
Fri Jun 29 23:18:43 CEST 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Thu Jun 28 23:48:49 2012 +0200| [347ecfdc63f939419ad6e66bc33f611c07ca9304] | committer: Stefano Sabatini

ffplay: move assignment in else block in audio_decode_frame()

Avoid confusing and pointless double assignment of variable
resampled_data_size.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=347ecfdc63f939419ad6e66bc33f611c07ca9304
---

 ffplay.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffplay.c b/ffplay.c
index 8d2e2af..f8a18d4 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1986,7 +1986,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};
@@ -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);
             } else {
                 is->audio_buf = is->frame->data[0];
+                resampled_data_size = data_size;
             }
 
             /* if no pts, then compute it */



More information about the ffmpeg-cvslog mailing list