---
Updated to merge the two branches of the if-block that are
equal after the change.

 avplay.c |   17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/avplay.c b/avplay.c
index 00becbe..9fe35c1 100644
--- a/avplay.c
+++ b/avplay.c
@@ -1792,24 +1792,9 @@ static int synchronize_audio(VideoState *is, short 
*samples,
                         wanted_size = max_size;
 
                     /* add or remove samples to correction the synchro */
-                    if (wanted_size < samples_size) {
+                    if (wanted_size != samples_size)
                         /* remove samples */
                         samples_size = wanted_size;
-                    } else if (wanted_size > samples_size) {
-                        uint8_t *samples_end, *q;
-                        int nb;
-
-                        /* add samples */
-                        nb = (samples_size - wanted_size);
-                        samples_end = (uint8_t *)samples + samples_size - n;
-                        q = samples_end + n;
-                        while (nb > 0) {
-                            memcpy(q, samples_end, n);
-                            q += n;
-                            nb -= n;
-                        }
-                        samples_size = wanted_size;
-                    }
                 }
                 av_dlog(NULL, "diff=%f adiff=%f sample_diff=%d apts=%0.3f 
vpts=%0.3f %f\n",
                         diff, avg_diff, samples_size - samples_size1,
-- 
1.7.9.5

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to