Browse code

vf_colormatrix: avoid using out_buf

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2012/07/22 04:35:05
Showing 1 changed files
... ...
@@ -61,6 +61,7 @@ typedef struct {
61 61
     char src[256];
62 62
     char dst[256];
63 63
     int hsub, vsub;
64
+    AVFilterBufferRef *outpicref
64 65
 } ColorMatrixContext;
65 66
 
66 67
 #define ma m[0][0]
... ...
@@ -341,9 +342,11 @@ static AVFilterBufferRef *get_video_buffer(AVFilterLink *inlink, int perms, int
341 341
 
342 342
 static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
343 343
 {
344
+    AVFilterContext *ctx = link->dst;
345
+    ColorMatrixContext *color = ctx->priv;
344 346
     AVFilterBufferRef *outpicref = avfilter_ref_buffer(picref, ~0);
345 347
 
346
-    link->dst->outputs[0]->out_buf = outpicref;
348
+    color->outpicref = outpicref;
347 349
 
348 350
     ff_start_frame(link->dst->outputs[0], outpicref);
349 351
 }
... ...
@@ -352,7 +355,7 @@ static void end_frame(AVFilterLink *link)
352 352
 {
353 353
     AVFilterContext *ctx = link->dst;
354 354
     ColorMatrixContext *color = ctx->priv;
355
-    AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;
355
+    AVFilterBufferRef *out = color->outpicref;
356 356
 
357 357
     if (link->cur_buf->format == PIX_FMT_YUV422P)
358 358
         process_frame_yuv422p(color, out, link->cur_buf);