libav: fix memory leak when converting packets to annex-b format