Commit 7395f13d authored by Lukas Rusak's avatar Lukas Rusak Committed by Jorge Ramirez-Ortiz

v4l2_m2m: decoder: fix memory leak

parent 7becc703
......@@ -149,11 +149,14 @@ static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)
if (avpkt.size) {
ret = v4l2_try_start(avctx);
if (ret)
if (ret) {
av_packet_unref(&avpkt);
return 0;
}
}
dequeue:
av_packet_unref(&avpkt);
return ff_v4l2_context_dequeue_frame(capture, frame);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment