]> git.sesse.net Git - ffmpeg/commit
avformat/mux: Only prepare input packet if there is a packet
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 9 Aug 2019 01:19:42 +0000 (03:19 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 1 Apr 2020 02:31:39 +0000 (04:31 +0200)
commitf4190a49ae2a3b17a12eaf75c1e9c3dfdae3e9e3
treea2d881a39404033cf734aa72ba01a7ec4383b74c
parenta500b975a87174f1994cf497892c2529cf42e834
avformat/mux: Only prepare input packet if there is a packet

It is unnecessary to call prepare_input_packet if there is no packet as
it doesn't do anything, except when the currently inactive code guarded
by !FF_API_COMPUTE_PKT_FIELDS2 || !FF_API_LAVF_AVCTX becomes active:
Then attempting to access pkt->stream_index will crash.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/mux.c