Skip to content

Commit

Permalink
Remove deprecared avcodec_close()
Browse files Browse the repository at this point in the history
From [docs](https://ffmpeg.org/doxygen/trunk/deprecated.html) see that
this function call is not needed:

"Do not use this function. Use avcodec_free_context() to destroy a codec
context (either open or closed). Opening and closing a codec context
multiple times is not supported anymore – use multiple codec contexts instead."

avcodec_free_context is already called.
  • Loading branch information
Pleune committed Aug 23, 2024
1 parent 501af3d commit 41805f7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/usb_cam/formats/mjpeg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ class MJPEG2RGB : public pixel_format_base
free(m_avoptions);
}
if (m_avcodec_context) {
avcodec_close(m_avcodec_context);
avcodec_free_context(&m_avcodec_context);
}
if (m_avframe_device) {
Expand Down

0 comments on commit 41805f7

Please sign in to comment.