mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-19 15:15:12 +08:00
avformat: unref packet after storing it in internal packet queue
Fixes a memory leak when using genpts
This commit is contained in:
@@ -1559,6 +1559,7 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
|
|||||||
|
|
||||||
ret = add_to_pktbuf(&s->internal->packet_buffer, pkt,
|
ret = add_to_pktbuf(&s->internal->packet_buffer, pkt,
|
||||||
&s->internal->packet_buffer_end, 1);
|
&s->internal->packet_buffer_end, 1);
|
||||||
|
av_packet_unref(pkt);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user