[FFmpeg-devel] [PATCH] avformat/utils: use the existing packet reference when parsing complete frames
michael at niedermayer.cc
Fri Apr 13 21:59:02 EEST 2018
On Thu, Apr 12, 2018 at 03:34:29PM -0300, James Almer wrote:
> If the parser returns full frames, then the output pointer retured by
> av_parser_parse2() is guaranteed to point to data contained in the
> input packet's buffer.
> Create a new reference to said buffer in that case, to avoid
> unnecessary data copy when queueing the packet later in the function.
> Signed-off-by: James Almer <jamrial at gmail.com>
> libavformat/utils.c | 23 ++++++++++++++++++++---
> 1 file changed, 20 insertions(+), 3 deletions(-)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: not available
More information about the ffmpeg-devel