On Tue, Oct 08, 2019 at 07:41:14AM +0200, Andreas Rheinhardt wrote:
> 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.rheinha...@gmail.com>
> ---
>  libavformat/mpeg.c | 23 +++++++----------------
>  1 file changed, 7 insertions(+), 16 deletions(-)

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to