[FFmpeg-devel] [PATCH 1/2] lavfi/video: ensure that filter_frame is called.

Michael Niedermayer michaelni at gmx.at
Fri Dec 28 15:17:38 CET 2012


On Fri, Dec 28, 2012 at 02:36:38PM +0100, Michael Niedermayer wrote:
> On Fri, Dec 28, 2012 at 02:24:57PM +0100, Michael Niedermayer wrote:
> > On Fri, Dec 28, 2012 at 10:52:27AM +0100, Nicolas George wrote:
> > > Le septidi 7 nivôse, an CCXXI, Michael Niedermayer a écrit :
> > > > after pull --rebase and both patches:
> > > > make fate-lavfi-tile
> > > > ==12655== Invalid read of size 8
> > > <snip>
> > > > Assertion link->cur_buf_copy->buf->refcount > 0 failed at libavfilter/video.c:381
> > > 
> > > I am sorry, but I am still unable to reproduce the issue. I am working with
> > > the following tree, without local changes:
> > > 
> > > ae69e57 lavfi/sink_buffer: switch to filter_frame.
> > > 909e799 lavfi/video: ensure that filter_frame is called.
> > > 9e04e11 libpostproc: alloc a few bytes more in the temporary buffer
> > > f1185fb libpostproc: Fix off by 1 error in the C dering code
> > > 69db85c mjpegdec: Support 16bit DQT
> > > 
> > > 9e04e11 is currently the head of the official repository, and AFAIK the
> > > (short) hash uniquely identifies the whole tree anyway (except for unlikely
> > > collisions. I tried both this and with only 909e799, with or without
> > > valgrind on x86_64, and x86_32, and fate-lavfi-tile (and the rest of FATE)
> > > succeeds.
> > 
> > you might need to build with --assert-level=1 or 2
> > and i did test on x86-64
> > 
> > ill retry with current HEAD and report back in a moment
> 
> I cant reproduce with current HEAD (0d4572a54b04ac983e6fb00bcdab6d9516726dbb)

I can reproduce (make: *** [fate-lavfi-tile] Error 139) with the old
checkout:
0b13b9c lavfi/video: ensure that filter_frame is called.
011169c mjpegdec: handle the occurance of rstn emulation
5ff8ca1 mjpegdec: Handle RSTn in progressive jpegs
47e7f57 mjpegdec: factor handle_rstn() out

Investigating reflog, the second failure appears to be git failing to
rebase the changes correctly.

before rebase i had:

@@ -311,6 +314,12 @@ static int default_end_frame(AVFilterLink *inlink)
 {
     AVFilterLink *outlink = NULL;

+    if (inlink->dstpad->filter_frame) {
+        AVFilterBufferRef *cur_buf = inlink->cur_buf;
+        inlink->cur_buf = NULL;
+        return inlink->dstpad->filter_frame(inlink, cur_buf);
+    }
+
     if (inlink->dst->nb_outputs)
         outlink = inlink->dst->outputs[0];

@@ -349,6 +358,9 @@ static int default_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
 {
     AVFilterLink *outlink = NULL;

+    if (inlink->dstpad->filter_frame)
+        return 0;
+
     if (inlink->dst->nb_outputs)
         outlink = inlink->dst->outputs[0];

after rebase:

@@ -275,6 +278,9 @@ static int default_end_frame(AVFilterLink *inlink)
 {
     AVFilterLink *outlink = NULL;

+    if (inlink->dstpad->filter_frame)
+        return 0;
+
     if (inlink->dst->nb_outputs)
         outlink = inlink->dst->outputs[0];

@@ -313,6 +319,12 @@ static int default_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
 {
     AVFilterLink *outlink = NULL;

+    if (inlink->dstpad->filter_frame) {
+        AVFilterBufferRef *cur_buf = inlink->cur_buf;
+        inlink->cur_buf = NULL;
+        return inlink->dstpad->filter_frame(inlink, cur_buf);
+    }
+
     if (inlink->dst->nb_outputs)
         outlink = inlink->dst->outputs[0];
------------
iam not sure what git was "thinking" here

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

DNS cache poisoning attacks, popular search engine, Google internet authority
dont be evil, please
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121228/d6007233/attachment.asc>


More information about the ffmpeg-devel mailing list