• Martin Storsjö's avatar
    rtpenc: Don't set max_frames_per_packet based on the packet frame size or frame rate · 4f6cd883
    Martin Storsjö authored
    Instead check the timestamps while muxing, to avoid buffering a
    too long timestamp range into one single packet.
    
    This makes the AMR and AAC packetization slightly less efficient,
    since we set a possibly unnecessarily high max_frames_per_packet.
    (These packetizers end up doing a memmove of the TOC bytes if
    sending a packet before max_frames_per_packet is achieved, and
    we end up setting max_frames_per_packet to a value that should
    be high enough for most uses.)
    
    All packetizers that use max_frames_per_packet now set it either
    to a default value, or to a value calculated based on other
    parameters, so none of them rely on the previous default setting.
    
    For iLBC, copy one frame at a time, to allow checking the timestamp
    range for each of them - basically doing potentially multiple
    loops to simplify the code instead of trying to calculate the
    number of frames to buffer while honoring s1->max_delay.
    
    This is in preparation for reducing the coupling between libavformat
    and libavcodec, by not having the muxers use the encoder field
    frame_size (which may not be available during e.g. stream copy).
    Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
    4f6cd883
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
arch.mak Loading commit data...
avconv.c Loading commit data...
avconv.h Loading commit data...
avconv_dxva2.c Loading commit data...
avconv_filter.c Loading commit data...
avconv_opt.c Loading commit data...
avconv_vda.c Loading commit data...
avconv_vdpau.c Loading commit data...
avplay.c Loading commit data...
avprobe.c Loading commit data...
cmdutils.c Loading commit data...
cmdutils.h Loading commit data...
cmdutils_common_opts.h Loading commit data...
common.mak Loading commit data...
configure Loading commit data...
library.mak Loading commit data...
version.sh Loading commit data...