[FFmpeg-devel] [WIP] New Filter (dejudder)
Nicholas Robbins
nickrobbins at yahoo.com
Sat Jan 25 21:18:03 CET 2014
> On Saturday, January 25, 2014 11:47 AM, Nicholas Robbins <nickrobbins at yahoo.com> wrote:
> >> On Friday, January 24, 2014 7:54 PM, Michael Niedermayer
> <michaelni at gmx.at> wrote:
>
>>
>> try valgrind or address sanitizer
>>
>> [...]
>>
>
> I'm looking into valgrind now.
>
>
>
>> On Friday, January 24, 2014 6:34 PM, Timothy Gu
> <timothygu99 at gmail.com> wrote:
>> May or may not be related: try to use av_malloc() or av_mallocz() instead
>> of malloc()
>>
>> Also try to debug this in gdb.
>
> I've tried several variations of av_malloc(), av_mallocz() av_free() and
> av_freep(). I keep getting segfaults.
>
> If I want an arrary of N int64_t's to use in my filter (N depends on an
> option passed to the filter) how do I allocate/free this block? It will only be
> written to and read from in filter_frame(). I looked around and tried to do what
> other filters did, but kept getting the segfault.
>
> If I use a fixed size array, no segfault.
Valgrind helped. I wasn't allocating enough memory. A combination of fixing rookie mistakes and RTFM'ing and it works now, or at least I thought it did.
Now it doesn't seem to be saving the PTS I write to frame->pts in filter_frame. If I print frame->pts inside, it shows the new PTS, but when it comes time to put that frame into the mkv it forgets the PTS. What am I doing wrong?
I've attached my current patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-adding-dejudder-filter.patch
Type: text/x-patch
Size: 6323 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140125/ff2a0771/attachment.bin>
More information about the ffmpeg-devel
mailing list