[FFmpeg-devel] [PATCH] avfilter/src_movi: Free packet on decoder error

Michael Niedermayer michaelni at gmx.at
Tue Jun 25 13:34:54 CEST 2013


On Tue, Jun 25, 2013 at 10:25:35AM +0200, Stefano Sabatini wrote:
> Typo in subject, you could write lavfi/movie while at it.
> 
> I suggest:
> lavfi/movie: free packet on decoder in case of error
> 
> On date Tuesday 2013-06-25 03:20:46 +0200, Michael Niedermayer encoded:
> > Prevents infinite loop, see Ticket2556
> > 
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavfilter/src_movie.c |    3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c
> > index 058838a..bdbf69e 100644
> > --- a/libavfilter/src_movie.c
> > +++ b/libavfilter/src_movie.c
> > @@ -514,6 +514,9 @@ static int movie_push_frame(AVFilterContext *ctx, unsigned out_id)
> >      if (ret < 0) {
> >          av_log(ctx, AV_LOG_WARNING, "Decode error: %s\n", av_err2str(ret));
> >          av_frame_free(&movie->frame);
> > +        av_free_packet(&movie->pkt0);
> 
> > +        pkt->size = 0; /* ready for next run */
> > +        pkt->data = NULL;
> 
> movie->pkt0->size = 0;
> movie->pkt0->data = NULL;
> 
> should be less confusing

fixed

note though there are more such cases in the file that you might want
to update

[...]
-- 
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/20130625/2a123394/attachment.asc>


More information about the ffmpeg-devel mailing list