[pjsip] pjmedia_wav_playerr bug

Dmitry Dudkin ddv at abinet.com
Sun Apr 29 20:32:06 EDT 2012


Hello,

I found small but very important bug in pjmedia_wav_player. With
PJMEDIA_FILE_NO_LOOP option it still play samples from start in last frame.
The problem is in fill_buffer that does not break a loop on EOF.

======================================================================
--- wav_player.c.old    2012-04-29 20:31:06.433848496 -0400
+++ wav_player.c        2012-04-29 19:29:44.133728965 -0400
@@ -157,6 +157,7 @@
                     int val = pjmedia_linear2alaw(0);
                     pj_memset(fport->eofpos, val, size_left);
                 }
+                size_left = 0;
             }
 
            /* Rewind file */

======================================================================


-- 
Regards,
 Dmitry                          mailto:ddv at abinet.com





More information about the pjsip mailing list