diff options
author | Niklas Haas <git@haasn.xyz> | 2018-07-26 17:37:34 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-10-01 20:29:51 +0300 |
commit | a985e8ed6b3444eba83763b96a27c414102c6f6e (patch) | |
tree | dd0d00b6d6540e254334b670d0d0a416a3fe2d5d /osdep/macosx_events.m | |
parent | 36eeeecff665c66a3079f72b3f9469a83d3df79d (diff) | |
download | mpv-a985e8ed6b3444eba83763b96a27c414102c6f6e.tar.bz2 mpv-a985e8ed6b3444eba83763b96a27c414102c6f6e.tar.xz |
encode: fix AVPacket deinitialization logic
Since this function is called with packets on the stack, trying to free
them makes no sense. Instead, it should unref (which is what
`av_interleaved_write_frame` does anyway, rather than freeing).
Also, the calling code tried unreffing the packet a second time, even
after it was "freed" by the callee in the failure case - and after
ownership was taken over by `av_interleaved_write_frame` in the
successful case. Both of these cases were wrong.
(cherry picked from commit 6d61c5f68a5b1faaaf5a38080c690e35bd31858c)
Diffstat (limited to 'osdep/macosx_events.m')
0 files changed, 0 insertions, 0 deletions