[FFmpeg-soc] Help needed with new concatenate filter

Brandon Mintern bmintern at gmail.com
Sun Apr 4 22:16:28 CEST 2010


On Thu, Apr 1, 2010 at 9:03 AM, Stefano Sabatini
<stefano.sabatini-lala at poste.it> wrote:
> On date Wednesday 2010-03-31 20:06:17 -0400, Brandon Mintern encoded:
>> Thanks a lot for the feedback. A new, much cleaner (and actually
>> similar to what I wrote on my first try before changing it to what you
>> saw) patch is at the bottom of this post. I still can't see why the
>> 2nd input is not being output; it seems like everything should be
>> getting properly propagated.
>
> You need to shift the PTSes of the second source, something of the
> kind:
> pts += last_pts_of_first_source;

I tried to do this in start_frame:

static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
{
    ConcatenateContext *con = link->dst->priv;

    if (con->first_input_consumed)
        picref->pts += con->first_input_last_pts;
    else
        con->first_input_last_pts = picref->pts;

    avfilter_null_start_frame(link, picref);
}


first_input_consumed is set in request_frame when the first input
returns a nonzero number.

Apparently my approach here is incorrect, because the filter still
isn't working as I am expecting it to. My current patch is attached if
anyone is interested in taking a look at what I have.

Thanks for your help,
Brandon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_concatenate.patch
Type: application/octet-stream
Size: 4435 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100404/346d858d/attachment.obj>


More information about the FFmpeg-soc mailing list