Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Nagy <ronag89@gmail.com>2012-05-22 02:14:48 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-05-22 16:59:27 +0400
commit965b8072781b439b36835a3df345a4c68e0c211f (patch)
treeb92da1d9ebaf35888396f71baeda0e240c8b3912 /libavfilter
parent1dd71e1cd5eac942666f95f406f7aed81c5ab208 (diff)
vf_yadif: Fixed potential access violation on EOF.
The correct invariant is (cur != NULL -> next != NULL). Not the other way around. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_yadif.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index fb4862d0be..d7fa98acc4 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "libavutil/avassert.h"
#include "libavutil/cpu.h"
#include "libavutil/common.h"
#include "libavutil/pixdesc.h"
@@ -238,6 +239,8 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
AVFilterContext *ctx = link->dst;
YADIFContext *yadif = ctx->priv;
+ av_assert0(picref);
+
if (yadif->frame_pending)
return_frame(ctx, 1);
@@ -308,7 +311,7 @@ static int request_frame(AVFilterLink *link)
ret = avfilter_request_frame(link->src->inputs[0]);
- if (ret == AVERROR_EOF && yadif->next) {
+ if (ret == AVERROR_EOF && yadif->cur) {
AVFilterBufferRef *next = avfilter_ref_buffer(yadif->next, AV_PERM_READ);
next->pts = yadif->next->pts * 2 - yadif->cur->pts;