Skip to content

Commit

Permalink
Don't use deprecated avcodec_close
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Jan 25, 2025
1 parent d5e0229 commit b96dc1d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/zm_remote_camera_rtsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ RemoteCameraRtsp::RemoteCameraRtsp(
RemoteCameraRtsp::~RemoteCameraRtsp() {

if ( mVideoCodecContext ) {
avcodec_close(mVideoCodecContext);
mVideoCodecContext = nullptr; // Freed by avformat_free_context in the destructor of RtspThread class
avcodec_free_context(&mVideoCodecContext);
}
// Is allocated in RTSPThread and is free there as well
mFormatContext = nullptr;
Expand Down

0 comments on commit b96dc1d

Please sign in to comment.