Should close videostore before closing input codecs/streams.

This commit is contained in:
Isaac Connor 2019-04-04 14:11:56 -04:00
parent 7955a1c9b2
commit d97dd6cdd9
1 changed files with 5 additions and 4 deletions

View File

@ -675,6 +675,11 @@ int FfmpegCamera::Close() {
} }
#endif #endif
if ( videoStore ) {
delete videoStore;
videoStore = NULL;
}
if ( mVideoCodecContext ) { if ( mVideoCodecContext ) {
avcodec_close(mVideoCodecContext); avcodec_close(mVideoCodecContext);
Debug(1,"After codec close"); Debug(1,"After codec close");
@ -700,10 +705,6 @@ int FfmpegCamera::Close() {
mFormatContext = NULL; mFormatContext = NULL;
} }
if ( videoStore ) {
delete videoStore;
videoStore = NULL;
}
if ( packetqueue ) { if ( packetqueue ) {
delete packetqueue; delete packetqueue;
packetqueue = NULL; packetqueue = NULL;