[Cin] About FFVideoStream::probe

Phyllis Smith phylsmith2017 at gmail.com
Fri May 21 03:47:07 CEST 2021

Andrew, I AM STUCK !

On Mon, May 3, 2021 at 10:09 PM Andrew Randrianasulu via Cin <
cin at lists.cinelerra-gg.org> wrote:

> I think I spotted my error, resulting in memory leak..
> Try to add
> av_frame_free(&frame);
> Just before return ret; line.. { line 1246 currently?}
> And after this re-enable line disabled in
> commit eabda9cf447580a974fd3d67a3d0a26f09aeb523
> ff->video_probe(1); in fileffmpeg.C
> And of course re-test ( i probably loaded only very small project or
> number of files for noticing this.. :/)
> First, I lost my great test case and have been searching almost daily for
that one, but am settling on something that may or may not be a good test.
Second, I can not figure out where to put the line:

Just before return ret; line.. { line 1246 currently?}

There are multiple "return ret:" lines in fileffmpeg.C but the one closest
to 1246 is at 1337 but this is just a guess:
int FFOptions::update()
        int ret = 0;
        FFOptions &conf = *this;

        for( int i=0; i<size(); ++i ) {
                FFOptions_Opt *fopt = conf[i];
                char val[BCTEXTLEN], *vp = fopt->get(val, sizeof(val));
                if( !vp || !strcmp(val, fopt->item_value->get_text()) )
        return ret;

The problem is then, that it does not compile and I get this error message:
fileffmpeg.C:1337:17: error: ‘frame’ was not declared in this scope; did
you mean ‘FFrame’?

Any ideas?  Thanks, Phyllis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210520/f50e6c61/attachment.htm>

More information about the Cin mailing list