• Andreas Rheinhardt's avatar
    avformat/mpeg: Remove secondary packet for reading VobSub · 6d354aeb
    Andreas Rheinhardt authored
    When vobsub_read_packet() reads a packet, it uses a dedicated AVPacket
    to get the subtitle timing and position from an FFDemuxSubtitlesQueue
    (which has been filled with this data during reading the idx file in
    vobsub_read_header); afterwards the actual subtitle data is read into
    the packet destined for output and the timing and position are copied
    to this packet. Afterwards, the local packet is unreferenced.
    
    This can be simplified: Simply use the output packet to get the timing
    and position from the FFDemuxSubtitlesQueue. The packet's size will be
    zero afterwards, so that it can be directly used to read the actual
    subtitle data. This makes copying the packet fields as well as
    unreferencing the local packet unecessary and also removes an instance
    of usage of sizeof(AVPacket) in libavformat.
    
    The only difference is that the returned packet will already be flagged
    as a keyframe. This currently only happens in compute_pkt_fields().
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    6d354aeb
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools 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...
libpostproc Loading commit data...
libswresample 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...
.travis.yml Loading commit data...
CONTRIBUTING.md 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.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...