We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a54cccb commit ffc4e2fCopy full SHA for ffc4e2f
include/usb_cam/formats/mjpeg.hpp
@@ -145,6 +145,15 @@ class MJPEG2RGB : public pixel_format_base
145
146
~MJPEG2RGB()
147
{
148
+ if (m_averror_str) {
149
+ free(m_averror_str);
150
+ }
151
+ if (m_avoptions) {
152
+ free(m_avoptions);
153
154
+ if (m_avpacket) {
155
+ free(m_avpacket);
156
157
if (m_avcodec_context) {
158
avcodec_close(m_avcodec_context);
159
avcodec_free_context(&m_avcodec_context);
@@ -155,10 +164,6 @@ class MJPEG2RGB : public pixel_format_base
164
if (m_avframe_rgb) {
165
av_frame_free(&m_avframe_rgb);
166
}
- if (m_avpacket) {
- av_packet_unref(m_avpacket);
160
- av_packet_free(&m_avpacket);
161
- }
162
167
if (m_avparser) {
163
168
av_parser_close(m_avparser);
169
0 commit comments