mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
v4l2_m2m: decoder: fix memory leak
This commit is contained in:
parent
7becc70375
commit
7395f13df9
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user