aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/fitsdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-28 17:15:35 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-09 20:03:37 +0200
commite4f7a2b003dddcc3d5e6af0f9abff5c601e815ac (patch)
tree4210ac45aedea0a63a2ce7ad07fe03b7060b34cc /libavcodec/fitsdec.c
parenta2564264116aabc5a95755ca93a31508ef547f40 (diff)
downloadffmpeg-e4f7a2b003dddcc3d5e6af0f9abff5c601e815ac.tar.gz
avcodec/encode: Avoid check whose result is known in advance
encode_send_frame_internal() is always only called if the buffer packet is empty and except when we are dealing with an audio codec that does not allow variable frame size it stays that way until a call to av_frame_ref() at the end of encode_send_frame_internal(). In case we are dealing with the small last frame of an audio encoder requiring constant frame size the frame will be allocated by pad_last_frame() and this the only case where this is so. So by returning directly after pad_last_frame(), we can avoid having to recheck whether the frame is still empty before av_frame_ref(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/fitsdec.c')
0 files changed, 0 insertions, 0 deletions