And use a single AVPacket for the entire process. This more closely follows the suggested API usage in the doxy. Signed-off-by: James Almer <jamrial@gmail.com>