Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1258 closed defect (fixed)

Divide by zero exception in jitter buffer with prefetching mechanism enabled (thanks Roman Puls for the report)

Reported by: nanang Owned by: nanang
Priority: normal Milestone: release-1.12
Component: pjmedia Version: 1.x-branch
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

There is bug in jb prefetching mechanism, the prefetch condition may cause unexpected JB state switches that will disturb burst level calculation, i.e: when JB empty condition occurs in initializing state, the state will be immediately switched to prefetching, and after the prefetch processing done, the state will be directly set to processing (instead of initializing). The expected behaviour is that JB state switch from initializing to processing is only done by jb_update().

This causes the following division by zero exception:

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0xb73a5b90 (LWP 7148)]
0x08184372 in pjmedia_jbuf_put_frame2 (jb=0x8323cf8, frame=0x826f86c, frame_size=80, bit_info=0, frame_seq=21, discarded=0xb73a502c)
   at ../src/pjmedia/jbuf.c:763
763                 burst_factor = cur_size / burst_level;
(gdb)

Change History (3)

comment:1 Changed 13 years ago by nanang

  • Resolution set to fixed
  • Status changed from new to closed

(In [3568]) Fix #1258: Fixed bug in jitter buffer, i.e: unexpected state switches when prefetch mechanism is active, by separating prefetch mechanism from JB state.

comment:2 Changed 13 years ago by bennylp

  • Description modified (diff)

comment:3 Changed 13 years ago by nanang

(In [3569]) Re #1258: Updated jitter buffer test data after r3568 fix.

Note: See TracTickets for help on using tickets.