mythtranscode: fix incorrect memory allocation

Use proper FFmpeg API to allocate AVPacket
Fixes #12213

(cherry picked from commit 09ed2c69354f6870667880aee16257b9600b01d8)
mythtranscode: always check if audio stream still exists

This doesn’t cater for when there’s a change in audio format or new audio stream, but it prevents the crash when that occurs.

Fixes #12207

(cherry picked from commit 43eed00660447d327b8dc13f3daa38e8e5ae8038)