ferdymercury / amide

AMIDE: a Medical Imaging Data Examiner
http://amide.sourceforge.net/
GNU General Public License v2.0
19 stars 12 forks source link

ffmpeg deprecated functions #23

Closed ferdymercury closed 2 years ago

ferdymercury commented 2 years ago

Attempt to fix https://github.com/ferdymercury/amide/issues/22

emollier commented 2 years ago

Good morning,

7180fc9e34a78f7ea3373bac1abf4b87388fcd23 looks good.

In 23a2596a5761dc2aaf042ebcbd1c791d95571867, what is supposed to happen when pkt is NULL? From what I interpret for the moment, if _av_packetalloc returns a NULL pointer, then the data writing is skipped and goes right to _av_packetfree and the function _mpeg_encodeframe returns TRUE. I'm not sure this is what should happen. Besides, it tastes like a double free condition may occur.

On the other hand, test with the prospective Debian package upgrade show the build is fixed with ffmpeg 5.0.1. I also managed to produce a fly through video with the example file m2862-small.xif, which gives an mpg file with the expected video inside, so this is very encouraging and helpful. Thank you!

Have a nice day! :)

ferdymercury commented 2 years ago

Good morning,

7180fc9 looks good.

In 23a2596, what is supposed to happen when pkt is NULL? From what I interpret for the moment, if _av_packetalloc returns a NULL pointer, then the data writing is skipped and goes right to _av_packetfree and the function _mpeg_encodeframe returns TRUE. I'm not sure this is what should happen. Besides, it tastes like a double free condition may occur.

good catch again!

emollier commented 2 years ago

It's all good on my end. I pulled your changes as quilt patch for the Debian package until the next release of amide.

Many thanks! :)

enlf-dev commented 2 years ago

All is fine on MSYS2.