avfilter/lavfutils: fix memleak of avpacket