[libav-bugs] [Bug 283] New: avplay.c some code will never be executed.

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Mon May 7 16:39:40 CEST 2012


           Summary: avplay.c some code will never be executed.
           Product: Libav
           Version: git HEAD
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: general
        AssignedTo: bugzilla at libav.org
        ReportedBy: hhuifly at 163.com

In avplay.c/fplay.c

else if (wanted_size > samples_size) {
       uint8_t *samples_end, *q;
       int nb;

          /* add samples */
          nb = (samples_size - wanted_size);
          while (nb > 0) {
            memcpy(q, samples_end, n);
            q += n;
            nb -= n;

because wanted_size > samples_size and  nb = (samples_size - wanted_size),

so nb < 0,the code in the loop of while will never be touched.

Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the libav-bugs mailing list