mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00: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