[FFmpeg-cvslog] avcodec/vp9_superframe_bsf: cache packets by creating new references rather than moving them
James Almer
git at videolan.org
Wed Nov 1 01:35:20 EET 2017
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Oct 31 20:29:53 2017 -0300| [7a02b364b68c0bf7f065f5c217fae458f0efdb8d] | committer: James Almer
avcodec/vp9_superframe_bsf: cache packets by creating new references rather than moving them
Should hopefully fix the invalid reads after free introduced in
e1bc3f4396ade6033787717d3650fb62663eae8 for all targets.
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a02b364b68c0bf7f065f5c217fae458f0efdb8d
---
libavcodec/vp9_superframe_bsf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c
index dea2cc232f..ceead5559c 100644
--- a/libavcodec/vp9_superframe_bsf.c
+++ b/libavcodec/vp9_superframe_bsf.c
@@ -147,7 +147,9 @@ static int vp9_superframe_filter(AVBSFContext *ctx, AVPacket *out)
goto done;
}
- av_packet_move_ref(s->cache[s->n_cache++], in);
+ res = av_packet_ref(s->cache[s->n_cache++], in);
+ if (res < 0)
+ goto done;
if (invisible) {
res = AVERROR(EAGAIN);
More information about the ffmpeg-cvslog
mailing list