obs-ffmpeg: Fix ffmpeg_output memory leak

The memory leak was introduced by a commit ba68eda59 to use
av_packet_alloc because av_init_packet got deprecated.

Also removes a boolean flag `new_packet` and use the pointer `packet`,
which is introduced by ba68eda59, to indicate there is a new packet.

Co-authored-by: Norihiro Kamae <norihiro@nagater.net>
This commit is contained in:
Internal Server Error - Gitea: Git with a cup of tea
500 Internal Server Error

Gitea Version: 1.28.0+dev-477-g8b6ad49a5f