lavc: Add refcounted api to AVPacket