3d0c / gmf

Go Media Framework
MIT License
889 stars 170 forks source link

`NewAudioFrame` has memory leak bug #160

Open Justme0 opened 6 months ago

Justme0 commented 6 months ago

In frame_go112.go https://github.com/3d0c/gmf/blob/master/frame_go112.go#L210

Firstly allocate heap memory. If avcodec_fill_audio_frame() fail, the heap memory will leak:

image

(BTW, I miss RAII in C++)