diff --git a/src/zm_packet.cpp b/src/zm_packet.cpp index 5056cf1c3..900faff59 100644 --- a/src/zm_packet.cpp +++ b/src/zm_packet.cpp @@ -65,9 +65,8 @@ ZMPacket::~ZMPacket() { if ( frame ) { av_frame_free( &frame ); } - if ( image ) { - delete image; - } + // We assume the image was allocated elsewhere, so we just unref it. + image = NULL; } int ZMPacket::decode( AVCodecContext *ctx ) {