frames are allocated in zm_packet now, so remove them

This commit is contained in:
Isaac Connor 2020-12-27 12:24:34 -05:00
parent c8d2eb9c0f
commit 085d83b250
2 changed files with 0 additions and 15 deletions

View File

@ -69,8 +69,6 @@ RemoteCameraRtsp::RemoteCameraRtsp(
mAudioStreamId = -1;
mCodecContext = nullptr;
mCodec = nullptr;
mRawFrame = nullptr;
mFrame = nullptr;
frameCount = 0;
/* Has to be located inside the constructor so other components such as zma will receive correct colours and subpixel order */
@ -89,8 +87,6 @@ RemoteCameraRtsp::RemoteCameraRtsp(
} // end RemoteCameraRtsp::RemoteCameraRtsp(...)
RemoteCameraRtsp::~RemoteCameraRtsp() {
av_frame_free(&mFrame);
av_frame_free(&mRawFrame);
if ( mCodecContext ) {
avcodec_close(mCodecContext);
@ -202,15 +198,6 @@ int RemoteCameraRtsp::PrimeCapture() {
#endif
Panic("Can't open codec");
// Allocate space for the native video frame
mRawFrame = zm_av_frame_alloc();
// Allocate space for the converted video frame
mFrame = zm_av_frame_alloc();
if ( mRawFrame == nullptr || mFrame == nullptr )
Fatal("Unable to allocate frame(s)");
#if LIBAVUTIL_VERSION_CHECK(54, 6, 0, 6, 0)
int pSize = av_image_get_buffer_size(imagePixFormat, width, height, 1);
#else

View File

@ -57,8 +57,6 @@ protected:
AVFormatContext *mFormatContext;
AVCodecContext *mCodecContext;
AVCodec *mCodec;
AVFrame *mRawFrame;
AVFrame *mFrame;
_AVPIXELFORMAT imagePixFormat;
#endif // HAVE_LIBAVFORMAT