[FFmpeg-devel] [PATCH] vp9: check return value of ff_thread_ref_frame().
Fixes CID 1322309. --- libavcodec/vp9.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 7624743..e67c761 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -4250,7 +4250,8 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame, for (i = 0; i < 8; i++) { if (s->refs[i].f->data[0]) ff_thread_release_buffer(ctx, >refs[i]); -ff_thread_ref_frame(>refs[i], >next_refs[i]); +if ((res = ff_thread_ref_frame(>refs[i], >next_refs[i])) < 0) +return res; } if (!s->invisible) { -- 2.1.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] vp9: check return value of ff_thread_ref_frame().
On Fri, Sep 04, 2015 at 07:33:29PM -0400, Ronald S. Bultje wrote: > Fixes CID 1322309. > --- > libavcodec/vp9.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) this breaks fate --- ./tests/ref/fate/vp9-16-intra-only 2015-09-05 00:47:48.445308437 +0200 +++ tests/data/fate/vp9-16-intra-only 2015-09-05 01:48:55.637385695 +0200 @@ -3,10 +3,6 @@ #hash: MD5 #tb 0: 12/359 #stream#, dts,pts, duration, size, hash -0, 0, 0,1, 152064, d57529601178948afa4818c3c8938884 -0, 1, 1,1, 152064, d47e00250c45733d64af067a417bcd06 -0, 2, 2,1, 152064, 984e41cd8350808ac6129746b2377818 -0, 3, 3,1, 152064, a5fa62996b4bb52e72e335722cf55bef -0, 4, 4,1, 152064, b71ca5ad650170ac921a71a6440fb508 -0, 5, 5,1, 152064, 76ba63001170b8992fc72be5c4ace731 -0, 6, 6,1, 152064, c4e7f96a8fd58d901b1d881926ddae09 +0, 1, 1,1, 152064, 984e41cd8350808ac6129746b2377818 +0, 2, 2,1, 152064, a5fa62996b4bb52e72e335722cf55bef +0, 3, 3,1, 152064, b71ca5ad650170ac921a71a6440fb508 Test vp9-16-intra-only failed. Look at tests/data/fate/vp9-16-intra-only.err for details. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is what and why we do it that matters, not just one of them. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] vp9: check return value of ff_thread_ref_frame().
Fixes CID 1322309. --- libavcodec/vp9.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 7624743..25e7419 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -4250,7 +4250,9 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame, for (i = 0; i < 8; i++) { if (s->refs[i].f->data[0]) ff_thread_release_buffer(ctx, >refs[i]); -ff_thread_ref_frame(>refs[i], >next_refs[i]); +if (s->next_refs[i].f->data[0] && +(res = ff_thread_ref_frame(>refs[i], >next_refs[i])) < 0) +return res; } if (!s->invisible) { -- 2.1.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] vp9: check return value of ff_thread_ref_frame().
On Fri, Sep 04, 2015 at 08:11:05PM -0400, Ronald S. Bultje wrote: > Fixes CID 1322309. > --- > libavcodec/vp9.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) LGTM thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel