video_buffer keep calling realloc() and keep expanding its memory usage:
In plm_buffer_has_start_code(), the discard_read_bytes is temporarily set to FALSE.
But when it goes all the way to plm_buffer_has(),
it will trigger the the load_callback(),
which is set to plm_read_video_packet() in plm_init_decoders().
Then plm_buffer_write() will eventually be called when discard_read_bytes is set to FALSE.
Finally it causes the video_buffer to keep expanding.
video_buffer keep calling realloc() and keep expanding its memory usage:
In
plm_buffer_has_start_code()
, thediscard_read_bytes
is temporarily set to FALSE.But when it goes all the way to
plm_buffer_has()
, it will trigger the theload_callback()
, which is set toplm_read_video_packet()
inplm_init_decoders()
.Then
plm_buffer_write()
will eventually be called whendiscard_read_bytes
is set to FALSE. Finally it causes thevideo_buffer
to keep expanding.