-
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: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6d354aeb