projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66d5e43
)
avformat/utils: unref packet on AVInputFormat.read_packet() failure
author
James Almer
<jamrial@gmail.com>
Fri, 20 Sep 2019 20:39:09 +0000
(22:39 +0200)
committer
James Almer
<jamrial@gmail.com>
Wed, 25 Sep 2019 23:53:05 +0000
(20:53 -0300)
Demuxers may have allocated a packet before encountering an error and aborting.
Fixes ticket #8150
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/utils.c
patch
|
blob
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
a7f2582
..
4657ba2
100644
(file)
--- a/
libavformat/utils.c
+++ b/
libavformat/utils.c
@@
-854,6
+854,8
@@
int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
av_init_packet(pkt);
ret = s->iformat->read_packet(s, pkt);
if (ret < 0) {
+ av_packet_unref(pkt);
+
/* Some demuxers return FFERROR_REDO when they consume
data and discard it (ignored streams, junk, extradata).
We must re-call the demuxer to get the real packet. */