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; mAudioStreamId = -1;
mCodecContext = nullptr; mCodecContext = nullptr;
mCodec = nullptr; mCodec = nullptr;
mRawFrame = nullptr;
mFrame = nullptr;
frameCount = 0; frameCount = 0;
/* Has to be located inside the constructor so other components such as zma will receive correct colours and subpixel order */ /* 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(...) } // end RemoteCameraRtsp::RemoteCameraRtsp(...)
RemoteCameraRtsp::~RemoteCameraRtsp() { RemoteCameraRtsp::~RemoteCameraRtsp() {
av_frame_free(&mFrame);
av_frame_free(&mRawFrame);
if ( mCodecContext ) { if ( mCodecContext ) {
avcodec_close(mCodecContext); avcodec_close(mCodecContext);
@ -202,15 +198,6 @@ int RemoteCameraRtsp::PrimeCapture() {
#endif #endif
Panic("Can't open codec"); 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) #if LIBAVUTIL_VERSION_CHECK(54, 6, 0, 6, 0)
int pSize = av_image_get_buffer_size(imagePixFormat, width, height, 1); int pSize = av_image_get_buffer_size(imagePixFormat, width, height, 1);
#else #else

View File

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