[FFmpeg-devel] libavfilter help

Stefano Sabatini stefano.sabatini-lala
Sun Sep 7 23:45:19 CEST 2008


On date Sunday 2008-08-24 17:17:47 +0200, Vitor Sessak encoded:
> Stefano Sabatini wrote:
> > On date Sunday 2008-08-24 07:58:48 +0200, Vitor Sessak encoded:
> >> Michael Niedermayer wrote:
> >>> On Sat, Aug 23, 2008 at 05:15:36PM +0200, Stefano Sabatini wrote:
> >>>> Hi all,
> >>>>
> >>>> which is the place where to discuss libavfilter issues?
> >>> ffmepg-dev when its about patches and development of libavfilter
> >>> everything i guess /dev/null
> >> You can always try ffmpeg-users and #ffmpeg for non-development stuff,  
> >> but there is no warranty of receiving some answer...
> >>
> >>>> Since I'm quite tired to tell on ffmpeg-user others to help completing
> >>>> it, I think it's arrived the time to do something myself...
> >> Nice! I've put some work on it some time ago, but I've been out of time  
> >> to do hard core development... The last thing I was working on was  
> >> trying to factorize and cleanup the code used in both ffmpeg.c and  
> >> ffplay.c patches (by creating a vsrc_buffer input filter). I'm attaching  
> >> a patch to what I have in my local tree. I didn't committed it yet to  
> >> the soc tree because it exposed some bugs in both vf_overlay.c and  
> >> vf_split.c.
> >>
> >> There are two things really missing in SVN to be able to enable the  
> >> first filter:
> >>
> >> 1- vf_scale (the sws_scale wrapper), that is needed for getting the  
> >> colorspace right. That correspond to very few code lines
> > 
> > What's exactly missing the soc vf_scale.c filter? Or is it just a
> > matter of importing it into SVN?
> 
> It's just a matter of getting it reviewed. I've posted already it for 
> review at 
> http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-February/042103.html 
> and Bobby made it decode one slice at a time since then (but it probably 
> broke the filter when ffmpeg is compiled without --enable-swscaler).

I just finished to debug a problem I was encountering when executing
this command (current libavfilter GSoc code):

ffplay -s 200x200 -f rawvideo /dev/zero

which was causing random crashes, then setting the size to 300x300 or
higher values that was always crashing.

It turned out that the problem was that the rawvideo decoder uses the
input buffer to set the data in the output AVFrame, so when the packet
containing the buffer was released then the output frame data was
released as well, and when accessed caused a crash.

So my solution is just to add the condition:

        if (is->video_st->codec->codec->id != CODEC_ID_RAWVIDEO)
            av_free_packet(pkt);

when freeing the packet in ffplay:get_video_frame().

If you think this is the right solution I can commit it in the soc
repo.

Before to start to work to the scale filter review by Michael I'd
also like to fix the problem for which gsoc ffplay terminates with an
FPE exception with VP6 video streams, which could need some redesign.

Regards.
-- 
FFmpeg = Freak Faboulous Multimedia Picky Enlightened Gymnast




More information about the ffmpeg-devel mailing list