diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-21 21:23:00 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-04 16:28:54 +0100 |
commit | 0b670a7f915fd4fa86444da7c24f325d651b16bd (patch) | |
tree | 6df01b6bd9ad25a3594747970e55e71a06b09d17 /libavcodec/mjpegenc.h | |
parent | 8ca7d474c19f856b28fa588e040b23b1a58368ed (diff) |
avcodec/mjpegenc: Use custom close function directly
Currently, ff_mpv_encode_end() is the close function of
the two MJPEG-based encoders; it calls ff_mjpeg_encode_close()
for them which adds a check to the generic code.
This commit reverses the order of this relationship:
The MJPEG encoders directly use a custom close function
which in turn calls ff_mpv_encode_end(). This avoids the branch
in ff_mpv_encode_end() and makes the generic code more generic.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mjpegenc.h')
-rw-r--r-- | libavcodec/mjpegenc.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libavcodec/mjpegenc.h b/libavcodec/mjpegenc.h index 2e92511276..bc9b017e7a 100644 --- a/libavcodec/mjpegenc.h +++ b/libavcodec/mjpegenc.h @@ -105,7 +105,6 @@ static inline void put_marker(PutBitContext *p, enum JpegMarker code) } int ff_mjpeg_encode_init(MpegEncContext *s); -void ff_mjpeg_encode_close(MpegEncContext *s); void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]); int ff_mjpeg_encode_stuffing(MpegEncContext *s); |