[haiku-commits] Re: haiku: hrev50187 - in src: add-ons/media/plugins/ffmpeg system/runtime_loader kits/media

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 7 Apr 2016 18:38:38 +0200

On 07/04/2016 18:29, Dario Casalinuovo wrote:


  * The ffmpeg documentation explicit forbid to write the trailer
  when the header write failed.


+       return fHeaderError == 0 ? B_OK : B_ERROR;

+       if (fHeaderError > 0) {
+               result = av_write_trailer(fContext);

Has this been tested? if 0 is B_OK, why not write trailer?


Right. It should be == 0. The point of the fix is to avoid writing the
trailer when the header failed and in this sense it works. Indeed this
could cause other problems, I'm going to fix it. Thanks!



I think he actually wanted to point that you return before the if
regardless, so the if is dead code anyway.

François.

Other related posts: