[haiku-commits] Re: haiku: hrev52272 - src/add-ons/media/plugins/ffmpeg

  • From: Stefano Ceccherini <stefano.ceccherini@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 24 Aug 2018 17:02:52 +0200

Il ven 24 ago 2018, 14:11 Stephan Aßmus <superstippi@xxxxxx> ha scritto:

What happens in case fCodecInitDone is "false"? Will fCodecContext now

be leaked in some code paths? I was wondering when you changed the
original code, which had "av_free(fCodecContext);" I am usually very
careful with these things and probably looked up what
avcodec_free_context() actually does, but I don't remember now. Did you
have a reason for changing this code in the first place?

Hi,
I think avcodec_free_context() did not even exist back then.
Avcodec_close_context() Will be deprecated, and since I was replacing old
and deprecated methods with newer ones, I did that here, too.
You are right that now the context could be leaked, I shouldve been more
careful.


Other related posts: